Пример #1
0
        public void JsonSerialization_ReturnsExpected()
        {
            var tags = new HashSet <string>()
            {
                "tagValue"
            };
            var mtag   = new MetricTag("tagname", tags);
            var result = Serialize(mtag);

            Assert.Equal("{\"tag\":\"tagname\",\"values\":[\"tagValue\"]}", result);
        }
Пример #2
0
        public void Constructor_SetsValues()
        {
            var tags = new HashSet <string>()
            {
                "tagValue"
            };
            var mtag = new MetricTag("tagname", tags);

            Assert.Equal("tagname", mtag.Tag);
            Assert.Same(tags, mtag.Values);
        }