Skip to content

Commit

Permalink
[Test] Adds test to added user control parameter
Browse files Browse the repository at this point in the history
Signed-off-by: gabrielsclimaco <[email protected]>
Signed-off-by: Ana Carolina <[email protected]>
  • Loading branch information
gabrielsclimaco committed May 13, 2017
1 parent 5c0a645 commit d7ca240
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void onCreate(Bundle savedInstanceState){
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState){
userClass = (UserClass) getArguments().getSerializable("userClass");
getDialog().setTitle(userClass.getOwnerEmail());
getDialog().setTitle(userClass.getClassName());

final View view = inflater.inflate(R.layout.fragment_join_class, container, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ public void shouldValidateSizeGroups() throws UserException {
assertEquals(10, userClass.getSizeGroups());
}

@Test
public void shouldProperlySetOwnerEmail() {
UserClass userClass = new UserClass();
userClass.setOwnerEmail("[email protected]");
assertEquals("[email protected]", userClass.getOwnerEmail());
}

@Test
public void shouldValidateConstructor() throws UserException {
UserClass userClass = new UserClass("Name", "Institution", 10.0f, "password", 10.0f, 5);
Expand Down

0 comments on commit d7ca240

Please sign in to comment.