public void ContainsTestEmptyCollection()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency           fd         = new FileDependencyTestFiller(@"c:\tst.txt");

            bool result = collection.Contains(fd);

            Assert.IsFalse(result);
        }
        public void AddTestSimpleScenario()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency           fd1        = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency           fd2        = new FileDependencyTestFiller(@"c:\test2.txt");

            collection.Add(fd1);
            collection.Add(fd2);

            Assert.IsTrue(collection.Contains(fd1));
            Assert.IsTrue(collection.Contains(fd2));
        }
        public void ContainsTestDependencyFound()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency           fd1        = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency           fd2        = new FileDependencyTestFiller(@"c:\test2.txt");

            collection.Add(fd1);
            collection.Add(fd2);

            bool result = collection.Contains(fd1);

            Assert.IsTrue(result);
        }
        public void AddListTestSimpleScenario()
        {
            FileDependencyCollection collection = new FileDependencyCollection();

            FileDependency[] fdList = new FileDependency[2];
            FileDependency   fd1    = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency   fd2    = new FileDependencyTestFiller(@"c:\test2.txt");

            fdList[0] = fd1;
            fdList[1] = fd2;

            collection.Add(fdList);

            Assert.IsTrue(collection.Contains(fd1));
            Assert.IsTrue(collection.Contains(fd2));
        }
        public void AddTestDuplicatedValue()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency           fd1        = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency           fd2        = new FileDependencyTestFiller(@"c:\test1.txt");

            collection.Add(fd1);

            try
            {
                collection.Add(fd2);

                Assert.IsTrue(false, "Adding a duplicate value to the collection should throw an InvalidOretationException.");
            }
            catch (InvalidOperationException e)
            {
                Console.Write(e);
                // pass if we get here
                Assert.IsTrue(true);
            }
        }
        public void AddListTestDuplicatedValue()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency[] fdList = new FileDependency[1];
            FileDependency fd1 = new FileDependencyTestFiller(@"c:\test1.txt");
            fdList[0] = new FileDependencyTestFiller(@"c:\test1.txt");

            collection.Add(fd1);

            try
            {
                collection.Add(fdList);

                Assert.IsTrue(false, "Adding a duplicate value to the collection should throw an InvalidOretationException.");
            }
            catch (InvalidOperationException e)
            {
                Console.Write(e);
                // pass if we get here
                Assert.IsTrue(true);
            }
        }
        public void ContainsTestEmptyCollection()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency fd = new FileDependencyTestFiller(@"c:\tst.txt");

            bool result = collection.Contains(fd);

            Assert.IsFalse(result);
        }
        public void ContainsTestDependencyNotFound()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency fd1 = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency fd2 = new FileDependencyTestFiller(@"c:\test2.txt");
            FileDependency fd3 = new FileDependencyTestFiller(@"c:\test3.txt");

            collection.Add(fd1);
            collection.Add(fd2);

            bool result = collection.Contains(fd3);

            Assert.IsFalse(result);
        }
        public void ContainsTestDependencyFoundCaseOnlyDifferent()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency fd1 = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency fd2 = new FileDependencyTestFiller(@"c:\test2.txt");
            FileDependency fd3 = new FileDependencyTestFiller(@"c:\TEST2.txt");

            collection.Add(fd1);
            collection.Add(fd2);

            bool result = collection.Contains(fd3);

            Assert.IsTrue(result);
        }
        public void AddTestSimpleScenario()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency fd1 = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency fd2 = new FileDependencyTestFiller(@"c:\test2.txt");

            collection.Add(fd1);
            collection.Add(fd2);

            Assert.IsTrue(collection.Contains(fd1));
            Assert.IsTrue(collection.Contains(fd2));
        }
        public void AddListTestSimpleScenario()
        {
            FileDependencyCollection collection = new FileDependencyCollection();
            FileDependency[] fdList = new FileDependency[2];
            FileDependency fd1 = new FileDependencyTestFiller(@"c:\test1.txt");
            FileDependency fd2 = new FileDependencyTestFiller(@"c:\test2.txt");
            fdList[0] = fd1;
            fdList[1] = fd2;

            collection.Add(fdList);

            Assert.IsTrue(collection.Contains(fd1));
            Assert.IsTrue(collection.Contains(fd2));
        }