Exemplo n.º 1
0
        public void GetAllFileNamesWhenAreFiles()
        {
            MockDirectory
            .Setup(x => x.GetFiles("Test", "Test"))
            .Returns(new List <string>
            {
                "Test1",
                "Test\\Test2",
                "Test\\Test3.Test"
            }.ToArray());
            var results = FileStreamer.GetAllFileNames("Test", "Test");

            Assert.IsNotNull(results);
            Assert.IsNotEmpty(results);
            Assert.AreEqual(3, results.Count());
            Assert.AreEqual("Test1", results[0]);
            Assert.AreEqual("Test2", results[1]);
            Assert.AreEqual("Test3", results[2]);
        }