|
@@ -197,7 +197,7 @@ func TestBrokerEquals(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func TestBrokerID(t *testing.T) {
|
|
|
+func TestBrokerAccessors(t *testing.T) {
|
|
|
|
|
|
broker := NewBroker("abc:123")
|
|
|
|
|
@@ -205,6 +205,10 @@ func TestBrokerID(t *testing.T) {
|
|
|
t.Error("New broker didn't have an ID of -1.")
|
|
|
}
|
|
|
|
|
|
+ if broker.Addr() != "abc:123" {
|
|
|
+ t.Error("New broker didn't have the correct address")
|
|
|
+ }
|
|
|
+
|
|
|
broker.id = 34
|
|
|
if broker.ID() != 34 {
|
|
|
t.Error("Manually setting broker ID did not take effect.")
|