public void When_ExtendedWithANonCollidingCollection_Then_BoughTagCollectionJoined()
        {
            var deltaCollection = TagsCollection
                                  .New()
                                  .SetTag("01", "01")
                                  .SetTag("02", "02");

            var extendedCollection = tagsCollection.ExtendWith(deltaCollection);

            Assert.IsTrue(extendedCollection.ContainsKey(TagsCollection.HOST));
            Assert.IsTrue(extendedCollection.ContainsKey("01"));
            Assert.IsTrue(extendedCollection.ContainsKey("02"));
        }
        public void SerializeDataPoint()
        {
            var sampleDataPoint = File.ReadAllText("DataPointFixtures/DataPointSample.json", Encoding.UTF8);

            var dataPoint = new DataPoint <int>
            {
                Value     = 15,
                Metric    = "testMetric",
                Timestamp = new DateTime(2015, 12, 12, 0, 0, 0, DateTimeKind.Utc).ToRawEpoch(),
                Tags      = TagsCollection.New("testHost")
            };

            CollectionAssert.AreEqual(dataPoint.AsByteArray(), Encoding.UTF8.GetBytes(sampleDataPoint));
        }
        public void SerializeDataPoint()
        {
            var sampleDataPoint = File.ReadAllText(@"DataPointFixtures/DataPointSample.json");

            var dataPoint = new DataPoint <int>
            {
                Value     = 15,
                Metric    = "testMetric",
                Timestamp = new DateTime(2015, 12, 12, 0, 0, 0, DateTimeKind.Utc).ToRawEpoch(),
                Tags      = TagsCollection.New("testHost")
            };

            Assert.AreEqual(sampleDataPoint, dataPoint.AsString());
        }
 public void When_ComparedToSame_ThenEqual()
 {
     Assert.IsTrue(tagsCollection.Equals(TagsCollection.New()));
 }
 public void Setup()
 {
     tagsCollection = TagsCollection.New();
 }
 public void Setup()
 {
     tagsCollection = TagsCollection.New(HostName);
 }