File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
main/java/com/auth0/json/mgmt/client
test/java/com/auth0/json/mgmt/client Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,17 @@ public Client(@JsonProperty("name") String name) {
154154 this .name = name ;
155155 }
156156
157+ /**
158+ * Creates a new Application instance setting the name and client id properties.
159+ *
160+ * @param name of the application.
161+ * @param clientId the client id of the application.
162+ */
163+ public Client (String name , String clientId ) {
164+ this .name = name ;
165+ this .clientId = clientId ;
166+ }
167+
157168 /**
158169 * Getter for the name of the application.
159170 *
Original file line number Diff line number Diff line change @@ -377,4 +377,18 @@ public void shouldIncludeReadOnlyValuesOnDeserialize() throws Exception {
377377 assertThat (client .isHerokuApp (), is (true ));
378378 assertThat (client .getSigningKeys (), is (notNullValue ()));
379379 }
380+
381+ @ Test
382+ public void shouldCreateClientWithNameOnly () {
383+ Client client = new Client ("My App" );
384+ assertThat (client .getName (), is ("My App" ));
385+ assertThat (client .getClientId (), is (nullValue ()));
386+ }
387+
388+ @ Test
389+ public void shouldCreateClientWithNameAndClientId () {
390+ Client client = new Client ("My App" , "client123" );
391+ assertThat (client .getName (), is ("My App" ));
392+ assertThat (client .getClientId (), is ("client123" ));
393+ }
380394}
You can’t perform that action at this time.
0 commit comments