示例#1
0
        public void CreatesDirecotryForLogFileIfItDoesNotExist()
        {
            DirectoryServie.Setup(x => x.Exists(It.IsAny <string>())).Returns(false);

            Writer.Write(LogInfo);

            DirectoryServie.Verify(x => x.Create(It.IsAny <string>()), Times.Once);
        }
示例#2
0
        public void DoesNotCreateDirecotryForLogFileIfItAlreadyExists()
        {
            Writer.Write(LogInfo);

            DirectoryServie.Verify(x => x.Create(It.IsAny <string>()), Times.Never);
        }