File tree Expand file tree Collapse file tree
main/java/com/auth0/json/mgmt/client
test/java/com/auth0/json/mgmt/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,6 +156,17 @@ public Client(@JsonProperty("name") String name) {
156156 this .name = name ;
157157 }
158158
159+ /**
160+ * Creates a new Application instance setting the name and client id properties.
161+ *
162+ * @param name of the application.
163+ * @param clientId the client id of the application.
164+ */
165+ public Client (String name , String clientId ) {
166+ this .name = name ;
167+ this .clientId = clientId ;
168+ }
169+
159170 /**
160171 * Getter for the name of the application.
161172 *
Original file line number Diff line number Diff line change @@ -381,4 +381,18 @@ public void shouldIncludeReadOnlyValuesOnDeserialize() throws Exception {
381381 assertThat (client .isHerokuApp (), is (true ));
382382 assertThat (client .getSigningKeys (), is (notNullValue ()));
383383 }
384+
385+ @ Test
386+ public void shouldCreateClientWithNameOnly () {
387+ Client client = new Client ("My App" );
388+ assertThat (client .getName (), is ("My App" ));
389+ assertThat (client .getClientId (), is (nullValue ()));
390+ }
391+
392+ @ Test
393+ public void shouldCreateClientWithNameAndClientId () {
394+ Client client = new Client ("My App" , "client123" );
395+ assertThat (client .getName (), is ("My App" ));
396+ assertThat (client .getClientId (), is ("client123" ));
397+ }
384398}
You can’t perform that action at this time.
0 commit comments