コード例 #1
0
        public void Replace_NoFiles()
        {
            //Arrange

            //Act
            var srv = new SqlScriptTokenService(_tokenValueProvider.Object);

            Assert.Throws <ArgumentNullException>(() =>
                                                  srv.Replace(new string[] { }));
        }
コード例 #2
0
        public void Replace_Success()
        {
            //Arrange
            _tokenValueProvider.Setup(tvp => tvp.GetValue("blah")).Returns("123");
            _tokenValueProvider.Setup(tvp => tvp.GetValue("stuff1")).Returns("234");
            _tokenValueProvider.Setup(tvp => tvp.GetValue("things")).Returns("345");
            _tokenValueProvider.Setup(tvp => tvp.GetValue("asdf")).Returns("456");

            //Act
            var srv = new SqlScriptTokenService(_tokenValueProvider.Object);

            srv.Replace(new[] { _tokensFilePath, _tokensFilePath2, });

            //Assert
            Assert.Pass();
        }