def testStarCompareEmptyStarsPlanetN(self): comparator = Comparator(self.EStar1, self.EStar2, "eu") result = comparator.starCompare() self.assertEqual(result["planetN"]["left"], []) self.assertEqual(result["planetN"]["right"], [])
def testStarCompareWithNonStarObjects(self): comparator = Comparator(self.planet1, self.planet2, "eu") try: comparator.starCompare() except ObjectTypeIncompatibleException: self.assertTrue(True)
def testStarCompareEmptyStarsStarC(self): comparator = Comparator(self.EStar1, self.EStar2, "eu") result = comparator.starCompare() self.assertEqual(result["starC"], {})
def testStarCompareStarWithOneFieldPlanetA(self): comparator = Comparator(self.Star1, self.Star2, "eu") result = comparator.starCompare() planetA = result["planetA"] answer = {"planet1": self.planet1, "planet3": self.planet3} self.assertEqual(planetA, answer)
def testStarCompareStarWithOneFieldPlanetDC(self): comparator = Comparator(self.Star1, self.Star2, "eu") result = comparator.starCompare() planetDC = result["planetDC"] answer = {} self.assertEqual(planetDC, answer)
def testStarCompareStarWithOneFieldStarN2(self): comparator = Comparator(self.Star1, self.Star2, "eu") result = comparator.starCompare() planetN = result["planetN"] answer = {"left": [], "right": [self.planet4]} self.assertEqual(planetN, answer)
def testStarCompareStarWithOneFieldStarN(self): comparator = Comparator(self.Star1, self.Star2, "eu") result = comparator.starCompare() starN = result["starN"] answer = {"data": ["mass"], "left": [100.0], "right": [112.0]} self.assertEqual(starN, answer)
def testStarCompareStarWithOneFieldStarC(self): comparator = Comparator(self.Star1, self.Star2, "eu") result = comparator.starCompare() starC = result["starC"] answer = {"mass": (100.0, 112.0)} self.assertEqual(starC, answer)