Skip to content

Instantly share code, notes, and snippets.

@thiagoolsilva
Created May 19, 2016 15:45
Show Gist options
  • Save thiagoolsilva/3964e1e3c963ac597631334324c48203 to your computer and use it in GitHub Desktop.
Save thiagoolsilva/3964e1e3c963ac597631334324c48203 to your computer and use it in GitHub Desktop.
public void test_remove_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("thiagoolsilva@gmail.com");
contact.setName("Lopes");
//2
//Check if the row was inserted
boolean result = databaseController.insertContact(contact);
Assert.assertEquals(true, result);
//3
//Check if the row was removed
boolean rowDeleted = databaseController.deleteContactByRg(fakeRg);
Assert.assertEquals(true, rowDeleted);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment