Beispiel #1
0
        public void TestAddTwoItemsDifferent()
        {
            var instance = new PathDistinct();

            instance.Add("a");
            instance.Add("b");
            Assert.AreEqual(2, instance.Count);
        }
Beispiel #2
0
        public void TestIsPrefixWorks()
        {
            var instance = new PathDistinct();

            instance.Add(@"HELLO\every\body");
            instance.Add(@"HelLo\ev.....");
            Assert.AreEqual(@"HELLO", instance.Prefix);
        }
Beispiel #3
0
        public void TestAddTwoItemsEqual()
        {
            var instance = new PathDistinct();

            instance.Add("b");
            instance.Add("B");
            Assert.AreEqual(1, instance.Count);
        }
Beispiel #4
0
        public void TestItems()
        {
            var instance = new PathDistinct();

            instance.Add(@"a\b");
            instance.Add(@"c\d");
            IEnumerator <string> enumerator = instance.Items.GetEnumerator();

            Assert.IsTrue(enumerator.MoveNext());
            Assert.AreEqual(@"a\b", enumerator.Current);
            Assert.IsTrue(enumerator.MoveNext());
            Assert.AreEqual(@"c\d", enumerator.Current);
            Assert.IsFalse(enumerator.MoveNext());
        }
Beispiel #5
0
        public void TestConstructorAndCountIsZero()
        {
            var instance = new PathDistinct();

            Assert.AreEqual(0, instance.Count);
        }