Exemplo n.º 1
0
        public void not_processed_when_no_argument_is_passed_in()
        {
            // arrange
            var returnThis = Substitute.For <FileBase>();

            fileSystem.File.Returns(returnThis);
            var optionSet = new OptionSet();

            vdirSupport.UpdateOptions(optionSet);
            optionSet.Parse(new string[0]);

            // act
            vdirSupport.Transform(new SiteContext
            {
                Pages = new List <Page>
                {
                    new NonProcessedPage
                    {
                        OutputFile = "Test.html"
                    },
                }
            });

            // assert
            returnThis.DidNotReceive().ReadAllText("Test.html");
        }
Exemplo n.º 2
0
        public void not_processed_when_no_argument_is_passed_in()
        {
            // arrange
            var returnThis = Substitute.For <FileBase>();

            fileSystem.File.Returns(returnThis);

            vdirSupport.Arguments = new VirtualDirectorySupportArguments();

            // act
            vdirSupport.Transform(new SiteContext
            {
                Pages = new List <Page>
                {
                    new NonProcessedPage
                    {
                        OutputFile = "Test.html"
                    },
                }
            });

            // assert
            returnThis.DidNotReceive().ReadAllText("Test.html");
        }