浏览代码

Add a test

Evan Huus 11 年之前
父节点
当前提交
5d12edf304
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      consumer_metadata_response_test.go

+ 8 - 0
consumer_metadata_response_test.go

@@ -58,4 +58,12 @@ func TestConsumerMetadataResponseSuccess(t *testing.T) {
 	if response.CoordinatorPort != 0xCCDD {
 		t.Error("Decoding produced incorrect coordinator port.")
 	}
+
+	if response.Coordinator.ID() != 0xAB {
+		t.Error("Decoding produced incorrect coordinator ID.")
+	}
+
+	if response.Coordinator.Addr() != "foo:52445" {
+		t.Error("Decoding produced incorrect coordinator address.")
+	}
 }