Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from bpillai/feature/make-get-map-to-allow-tes…
Browse files Browse the repository at this point in the history
…ting

add public get map method to allow testing
  • Loading branch information
chemdrew committed Oct 12, 2018
2 parents 72d6bba + 714c5a8 commit f52628f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nodes/src/main/java/io/aexp/nodes/graphql/InputObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public Builder put(String key, T value) {
public InputObject<T> build() {
return new InputObject<T>(this);
}
}

public Map getMap() {
return map;
}
}
9 changes: 9 additions & 0 deletions nodes/src/test/java/io/aexp/nodes/graphql/ArgumentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,13 @@ public void argumentEnumTest() {
assertEquals(STATUS.active, argument.getValue());
assertEquals("Argument{key='test', value=active}", argument.toString());
}
@Test
public void argumentInputObjectTest() {
Argument argument = new Argument(null, null);
argument.setKey("test");
InputObject object = new InputObject.Builder().put("key", "value").build();
argument.setValue(object);
assertEquals("test", argument.getKey());
assertEquals("value", object.getMap().get("key"));
}
}

0 comments on commit f52628f

Please sign in to comment.