Example #1
0
        public void BuildFileListing_Given_FileInfo_Returns_NewFileListing()
        {
            //------------Setup for test-------------------------
            FileSystemInfo fileSystemInfo = new FileSytemInfoMock();
            var            files          = new GetFiles();
            //------------Execute Test---------------------------
            var results = files.BuildFileListing(fileSystemInfo);

            //------------Assert Results-------------------------
            Assert.IsNotNull(results);
            Assert.IsNotNull(results.GetType() == typeof(FileListing));
            Assert.IsNotNull(results);
            Assert.AreEqual(results.Name, fileSystemInfo.Name);
            Assert.AreEqual(results.FullName, fileSystemInfo.FullName);
        }