Esempio n. 1
0
  @Test
  public void testDifference() {
    IIsotope element1 = mock(IIsotope.class);
    IIsotope element2 = mock(IIsotope.class);
    when(element1.getSymbol()).thenReturn("H");
    when(element2.getSymbol()).thenReturn("C");

    IDifference difference = IsotopeDiff.difference(element1, element2);
    Assert.assertNotNull(difference);
  }
Esempio n. 2
0
  @Test
  public void testDiff() {
    IIsotope element1 = mock(IIsotope.class);
    IIsotope element2 = mock(IIsotope.class);
    when(element1.getSymbol()).thenReturn("H");
    when(element2.getSymbol()).thenReturn("C");

    String result = IsotopeDiff.diff(element1, element2);
    Assert.assertNotNull(result);
    Assert.assertNotSame(0, result.length());
    assertContains(result, "IsotopeDiff");
    assertContains(result, "H/C");
  }
Esempio n. 3
0
 @Test
 public void testMatchAgainstItself() {
   IIsotope element1 = mock(IIsotope.class);
   String result = IsotopeDiff.diff(element1, element1);
   assertZeroLength(result);
 }