Exemplo n.º 1
0
        public void ToString_ContainsTag()
        {
            var tag      = Guid.NewGuid().ToString();
            var interval = TaggedInterval.Create(0, 10, tag);

            var output = interval.ToString();

            Assert.That(output, Is.StringContaining(tag));
        }
        public void Equals_IntervalWithDataAgainstSameIntervalWithoutData_ComparesEqual()
        {
            TaggedInterval <int> a = TaggedInterval.Create(0, 10, "test");
            Interval <int>       b = Interval.Create(0, 10);

            var result = IntervalEqualityComparer <int> .Default.Equals(a, b);

            Assert.That(result, Is.True);
        }
Exemplo n.º 3
0
        public void Create_WithTag_StoresTagIntoProperty()
        {
            var interval = TaggedInterval.Create(0, 10, "test");

            Assert.That(interval.Tag, Is.EqualTo("test"));
        }