From b08c9be9a69a65bf875a54fc71b990d7c829f84e Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Fri, 3 Jan 2020 01:01:36 +0100 Subject: [PATCH] Remove unused code --- testtools/testtools_test.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 testtools/testtools_test.go diff --git a/testtools/testtools_test.go b/testtools/testtools_test.go deleted file mode 100644 index c129908..0000000 --- a/testtools/testtools_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package testtools - -import ( - "github.com/cyrilix/robocar-base/mqttdevice" - "testing" -) - -func TestFakePublisher_Publish(t *testing.T) { - p := NewFakePublisher() - - cases := []struct { - topic string - topicPublished string - value mqttdevice.MqttValue - expected string - }{ - {"test/topic1", "test/topic1", mqttdevice.NewMqttValue(1), "1"}, - {"test/topic2", "test/invalid", mqttdevice.NewMqttValue(1), ""}, - } - - for _, c := range cases { - p.Publish(c.topic, c.value) - val := p.PublishedEvent(c.topicPublished) - if v, _ := val.StringValue(); v != c.expected { - t.Errorf("FakePublisher.Publish(%v, %v): %v, wants %v", c.topic, string(c.value), v, c.expected) - } - - } -}