def sample(self, pInput, pIntermediate, pResult): lclMap1 = BasicMapInputToIntermediate() lclMap1.defineMap(pInput, pIntermediate) lclIntermediate = lclMap1.compute(pInput) self.assertEqual(lclIntermediate, pIntermediate) print("Intermediates") print(pIntermediate) print(lclIntermediate) lclMap2 = BasicMapIntermediateToResult() lclMap2.defineMap(lclIntermediate, pResult) lclResult = lclMap2.compute(lclIntermediate) self.assertEqual(lclResult, pResult)
def sample(self, pPasswordList, pIntermediate): lclStringIntConverter = BasicStringIntConverter() lclStringJoiner = BasicStringJoiner(lclStringIntConverter) lclCombiner = BasicCombiner() lclJoinerAndCombiner = BasicStringJoinerAndCombiner(lclStringJoiner, lclCombiner) lclCombinedInput = lclJoinerAndCombiner.joinAndCombine(pPasswordList) lclDifferenceMapper = BasicDifferenceMapper() lclDifferenceMapper.defineMap(lclCombinedInput, pIntermediate) lclMapInputToIntermediate = BasicMapInputToIntermediate(lclDifferenceMapper, lclJoinerAndCombiner) lclMapInputToIntermediate.defineMap(pPasswordList, pIntermediate) self.assertEqual(lclMapInputToIntermediate.compute(pPasswordList), pIntermediate)