Skip to content

Commit

Permalink
adds null check tests
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviojava committed Jan 23, 2018
1 parent e4c5e88 commit 4fda9eb
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,32 @@ public void shouldInsertJustKeyAsync() {
}

@Test
public void shouldReturnErrorWhenColumnFamilyIsNull() {
public void shouldReturnErrorWhenInsertColumnFamilyIsNull() {
assertThrows(NullPointerException.class, () -> {
columnEntityManager.insert((ColumnEntity) null);
});
}

@Test
public void shouldReturnErrorWhenIterableColumnFamilyIsNull() {
public void shouldReturnErrorWhenInsertIterableColumnFamilyIsNull() {
assertThrows(NullPointerException.class, () -> {
columnEntityManager.insert((Iterable<ColumnEntity>) null);
});
}

@Test
public void shouldReturnErrorWhenUpdateColumnFamilyIsNull() {
assertThrows(NullPointerException.class, () -> {
columnEntityManager.insert((ColumnEntity) null);
});
}

@Test
public void shouldReturnErrorWhenUpdateIterableColumnFamilyIsNull() {
assertThrows(NullPointerException.class, () -> {
columnEntityManager.insert((Iterable<ColumnEntity>) null);
});
}
@Test
public void shouldInsertColumnsAsync() {
ColumnEntity columnEntity = getColumnFamily();
Expand Down

0 comments on commit 4fda9eb

Please sign in to comment.