Beispiel #1
0
 def test_when_get_no_existed_event_count_should_return_zero(self):
     # Given
     p = Packet("receiver", "    sender", [])
     # When
     event_a_log_count = p.get_event_count("A")
     event_b_log_count = p.get_event_count("B")
     # Then
     self.assertEqual(event_a_log_count, 0)
     self.assertEqual(event_b_log_count, 0)
Beispiel #2
0
 def test_when_get_existed_event_count_should_return_log_count(self):
     # Given
     e1 = Event("LOGAA", 2, 1, 1, 1, 1)
     e2 = Event("LOGAB", 3, 1, 1, 1, 1)
     p = Packet("receiver", "    sender", [e1, e2])
     # When
     event_a_log_count = p.get_event_count("A")
     event_b_log_count = p.get_event_count("B")
     # Then
     self.assertEqual(event_a_log_count, 2)
     self.assertEqual(event_b_log_count, 3)