test_class.file: misc/diff/src/test/java/org/openscience/cdk/tools/diff/SingleElectronDiffTest.java
test_class.identifier: SingleElectronDiffTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testDifference() {
          IAtom carbon = mock(IAtom.class);
          IAtom oxygen = mock(IAtom.class);
  
          when(carbon.getSymbol()).thenReturn("C");
          when(carbon.getSymbol()).thenReturn("H");
  
          IBond bond1 = mock(IBond.class);
          IBond bond2 = mock(IBond.class);
  
          when(bond1.getOrder()).thenReturn(IBond.Order.SINGLE);
          when(bond2.getOrder()).thenReturn(IBond.Order.DOUBLE);
  
          when(bond1.getAtomCount()).thenReturn(2);
          when(bond2.getAtomCount()).thenReturn(2);
  
          when(bond1.getBegin()).thenReturn(carbon);
          when(bond1.getEnd()).thenReturn(carbon);
          when(bond2.getBegin()).thenReturn(carbon);
          when(bond2.getEnd()).thenReturn(oxygen);
  
          bond1.setOrder(IBond.Order.SINGLE);
          bond2.setOrder(IBond.Order.DOUBLE);
  
          IDifference difference = BondDiff.difference(bond1, bond2);
          Assert.assertNotNull(difference);
      }
test_case.class_method_signature: SingleElectronDiffTest.testDifference()
test_case.full_signature: @Test public void testDifference()
test_case.identifier: testDifference
test_case.invocations: mock mock thenReturn when getSymbol thenReturn when getSymbol mock mock thenReturn when getOrder thenReturn when getOrder thenReturn when getAtomCount thenReturn when getAtomCount thenReturn when getBegin thenReturn when getEnd thenReturn when getBegin thenReturn when getEnd setOrder setOrder difference assertNotNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDifference()
focal_class.file: misc/diff/src/main/java/org/openscience/cdk/tools/diff/SingleElectronDiff.java
focal_class.identifier: SingleElectronDiff
focal_class.class_method_signature: SingleElectronDiff.SingleElectronDiff()
focal_class.full_signature: private  SingleElectronDiff()
focal_class.identifier: SingleElectronDiff
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SingleElectronDiff()
focal_class.class_method_signature: SingleElectronDiff.diff(IChemObject first, IChemObject second)
focal_class.full_signature: public static String diff(IChemObject first, IChemObject second)
focal_class.identifier: diff
focal_class.modifiers: public static
focal_class.parameters: (IChemObject first, IChemObject second)
focal_class.return: String
focal_class.signature: String diff(IChemObject first, IChemObject second)
focal_class.class_method_signature: SingleElectronDiff.difference(IChemObject first, IChemObject second)
focal_class.full_signature: public static IDifference difference(IChemObject first, IChemObject second)
focal_class.identifier: difference
focal_class.modifiers: public static
focal_class.parameters: (IChemObject first, IChemObject second)
focal_class.return: IDifference
focal_class.signature: IDifference difference(IChemObject first, IChemObject second)
focal_method.body: public static IDifference difference(IChemObject first, IChemObject second) {
          if (!(first instanceof ISingleElectron && second instanceof ISingleElectron)) {
              return null;
          }
          ISingleElectron firstB = (ISingleElectron) first;
          ISingleElectron secondB = (ISingleElectron) second;
          IDifferenceList totalDiff = new ChemObjectDifference("SingleElectronDiff");
          totalDiff.addChild(AtomDiff.difference(firstB.getAtom(), secondB.getAtom()));
          totalDiff.addChild(ElectronContainerDiff.difference(first, second));
          if (totalDiff.childCount() > 0) {
              return totalDiff;
          } else {
              return null;
          }
      }
focal_method.class_method_signature: SingleElectronDiff.difference(IChemObject first, IChemObject second)
focal_method.full_signature: public static IDifference difference(IChemObject first, IChemObject second)
focal_method.identifier: difference
focal_method.invocations: addChild difference getAtom getAtom addChild difference childCount
focal_method.modifiers: public static
focal_method.parameters: (IChemObject first, IChemObject second)
focal_method.return: IDifference
focal_method.signature: IDifference difference(IChemObject first, IChemObject second)