示例#1
0
 def test_when_set_id_for_events_should_stores_in_events(self):
     # Given
     e1 = Event("LOGAA", 1, 1, 1, 1, 1)
     e2 = Event("LOGAB", 1, 1, 1, 1, 1)
     p = Packet("receiver", "    sender", [e1, e2])
     # When
     p.set_id(11)
     p.set_id_for_events()
     # Then
     self.assertEqual(e1.get_packet_id(), 11)
     self.assertEqual(e2.get_packet_id(), 11)
示例#2
0
 def test_when_set_packet_id_should_store_id(self):
     # Given
     event = Event("    A", 1, 2, 3, 4, 5)
     # When
     event.set_packet_id(11)
     # Then
     self.assertEqual(event.get_packet_id(), 11)