Created
May 19, 2016 15:44
-
-
Save thiagoolsilva/0b722077553680bad989ea58361dd8c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void test_check_fetch_content() { | |
//1. | |
//Insert the content and check if the test was successfully | |
final String fakeRg = "0000000"; | |
Contact contact = new Contact(fakeRg); | |
contact.setAge(30); | |
contact.setEmail("[email protected]"); | |
contact.setName("Lopes"); | |
boolean result = databaseController.insertContact(contact); | |
Assert.assertEquals(true, result); | |
//2 | |
//Fetch the content and check its content | |
Contact queryContact = databaseController.getContactByRg(fakeRg); | |
//3 | |
//Check the name | |
Assert.assertEquals(contact.getName(), queryContact.getName()); | |
//4 | |
//Check the Age | |
Assert.assertEquals(contact.getAge(), queryContact.getAge()); | |
//5 | |
//Check the Email | |
Assert.assertEquals(contact.getEmail(), queryContact.getEmail()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment