public void FileSystemScriptResolver_Throws_FileNotFoundException_If_Script_Is_Not_Found()
 {
     _fileServiceMock
         .Setup(it => it.Exists())
         .Returns(true);
     var fFileSysSctRes = new FileSystemScriptResolver(null, _fileServiceMock.Object);
 }
 public void FileSystemScriptResolver_Throws_FileNotFoundException_If_Script_Is_Not_Found()
 {
     _fileServiceMock
     .Setup(it => it.Exists())
     .Returns(true);
     var fFileSysSctRes = new FileSystemScriptResolver(null, _fileServiceMock.Object);
 }
 public void GetSqlScript_Throws_FileNotFoundException_If_Script_Is_Not_Found()
 {
     _fileServiceMock
         .Setup(it => it.Exists())
         .Returns(false);
     var fFileSysSctRes = new FileSystemScriptResolver("FilePath", _fileServiceMock.Object);
     fFileSysSctRes.GetSqlScript();
 }
 public void GetSqlScript_Returns_File_Contents_As_String()
 {
     _fileServiceMock.Setup(it => it.Exists()).Returns(true);
     var scriptValue = "Select 1 From SomeTable";
     _fileServiceMock.Setup(it => it.OpenText()).Returns(new StreamReader(BuildScriptMemoryStream(scriptValue)));
     var fFileSysSctRes = new FileSystemScriptResolver("FilePath", _fileServiceMock.Object);
     Assert.AreEqual(scriptValue, fFileSysSctRes.GetSqlScript());
 }
        public void GetSqlScript_Throws_FileNotFoundException_If_Script_Is_Not_Found()
        {
            _fileServiceMock
            .Setup(it => it.Exists())
            .Returns(false);
            var fFileSysSctRes = new FileSystemScriptResolver("FilePath", _fileServiceMock.Object);

            fFileSysSctRes.GetSqlScript();
        }
        public void GetSqlScript_Returns_File_Contents_As_String()
        {
            _fileServiceMock.Setup(it => it.Exists()).Returns(true);
            var scriptValue = "Select 1 From SomeTable";

            _fileServiceMock.Setup(it => it.OpenText()).Returns(new StreamReader(BuildScriptMemoryStream(scriptValue)));
            var fFileSysSctRes = new FileSystemScriptResolver("FilePath", _fileServiceMock.Object);

            Assert.AreEqual(scriptValue, fFileSysSctRes.GetSqlScript());
        }