def test_distinct_with_objects(self): self.assertDictEqual( sources.distinctObjects().to_dictionary(lambda k: k, lambda k: len(k)), { 'asd': 3, 'a': 1, 'ba': 2 })
def test_distinct_with_objects(self): self.assertEqual(sources.distinctObjects().max(lambda k: len(k)), 'asd')
def test_distinct_with_objects(self): self.assertEqual(sources.distinctObjects().first(), 'asd')
def test_distinct_with_objects(self): self.assertTrue(sources.distinctObjects().any_matches(lambda k: k != 'a'))
def test_distinct_with_objects(self): self.assertListEqual(sources.distinctObjects().to_list(), ['asd', 'a', 'ba'])
def test_distinct_with_objects(self): self.assertEqual(sources.distinctObjects().join(', '), 'asd, a, ba')
def test_distinct_with_objects(self): self.assertListEqual(forEachOpHelper(sources.distinctObjects()), ['asd', 'a', 'ba'])
def test_distinct_with_objects(self): self.assertEqual(sources.distinctObjects().last(), 'ba')
def test_distinct_with_objects(self): self.assertEqual(sources.distinctObjects().count(), 3)