def test_interfaces(self): trail = Trail() marker_constructor = Marker( trail, 222, 555, False, SCOPE_NONE, [333, 444], ["test parameter", "other test parameter"]).set_timestamp(TIMESTAMP) marker_plurals = Marker(trail, 222).set_timestamp(TIMESTAMP) marker_plurals.set_instance_id(555) marker_plurals.add_static_params([333, 444]) marker_plurals.add_variable_params(["test parameter", "other test parameter"]) marker_singles = Marker(trail, 222).set_timestamp(TIMESTAMP) marker_singles.set_instance_id(555) marker_singles.add_static_param(333).add_static_param(444) marker_singles.add_variable_param("test parameter")\ .add_variable_param("other test parameter") self.assertEqual(marker_constructor.serialize(), marker_plurals.serialize()) self.assertEqual(marker_constructor.serialize(), marker_singles.serialize()) self.assertEqual(marker_constructor.serialize(), MARKER_STRING_ALL)
def test_one_static_param(self): marker = Marker(Trail(), 222).set_timestamp(TIMESTAMP) marker.add_static_param(333) self.assertEqual(marker.serialize(), MARKER_STRING_ONE_STATIC)