Ejemplo n.º 1
0
 @SmallTest
 public void testGetValuesThrowsNullPointerExceptionIfTagIsNull() {
   try {
     mapper.getValues(null);
     fail("No exception has been thrown");
   } catch (NullPointerException e) {
     assertNotNull(e);
   }
 }
Ejemplo n.º 2
0
  @SmallTest
  public void testGetValuesReturnsCorrectValues() {
    // Given
    UUID id = randomUUID();
    String name = "Food";
    Tag tag = new Tag(id, name);

    // When
    ContentValues values = mapper.getValues(tag);

    // Then
    assertNotNull(values);
    assertEquals(id.toString(), values.get(ID));
    assertEquals(name, values.get(NAME));
  }