Beispiel #1
0
        public void AddFile_NonExistingFile_Should_Throw_FileNotFoundException()
        {
            const string fileName = "e:\\path\\file.txt";

            _fileSystemMock.Setup(f => f.FileExists(It.IsAny <string>())).Returns(false);

            Action addFile = () => _dependencyList.AddFile(fileName);

            addFile.Should().Throw <FileNotFoundException>();
        }
Beispiel #2
0
        public void Should_Resolve_Assembly_By_Name()
        {
            var list = _dependencyList.AddFile("SharpArch.Domain").Build();

            list.Should().HaveCount(1);
            var fullPath = list[0];

            fullPath.Should().EndWith("SharpArch.Domain.dll");
            File.Exists(fullPath).Should().BeTrue("file '{0}'cannot be found on disk", fullPath);
        }