Пример #1
0
        public void WhenFilenameIsEmptyString_Exists_IsFalse()
        {
            XmlCommentFile commentFile = CreateXmlCommentFile(string.Empty);

            bool result = commentFile.Exists();

            Assert.AreEqual(false, result);
        }
Пример #2
0
        public void WhenFileExists_Exists_IsTrue()
        {
            XmlCommentFile commentFile = CreateXmlCommentFile("exists.dll");

            _fileSystem.Setup(p => p.FileExists("exists.dll")).Returns(true);

            bool result = commentFile.Exists();

            Assert.AreEqual(true, result);
        }
Пример #3
0
        public void WhenFileDoesntExist_Exists_IsFalse()
        {
            XmlCommentFile commentFile = CreateXmlCommentFile("doesnt_exist.dll");

            _fileSystem.Setup(p => p.FileExists(It.IsAny <string>())).Returns(false);

            bool result = commentFile.Exists();

            Assert.AreEqual(false, result);
        }