def test_map(self): self.assertDictEqual( sources.map().to_dictionary(lambda k: k, lambda k: k % 4), { 0: 0, 4: 0, 8: 0 })
def test_map(self): self.assertEqual(sources.map().max(), 8)
def test_map(self): self.assertEqual(sources.map().first(), 0)
def test_map(self): self.assertTrue(sources.map().any_matches(lambda k: k % 4 == 0))
def test_map(self): self.assertEqual(sources.map().average(), 4)
def test_map(self): self.assertTupleEqual(sources.map().statistics(), NumberStatistics(12, 3, 0, 8, 4))
def test_map(self): self.assertListEqual(sources.map().to_list(), [0, 4, 8])
def test_map(self): self.assertEqual(sources.map().join('x'), '0x4x8')
def test_map(self): self.assertEqual(sources.map().sum(), 12)
def test_map(self): self.assertListEqual(forEachOpHelper(sources.map()), [0, 4, 8])
def test_map(self): self.assertEqual(sources.map().count(), 3)