Ejemplo n.º 1
0
            public void should_be_able_to_transform_source()
            {
                string source   = "@color: #4D926F;#header {color: @color;}h2 {color: @color;}";
                string expected = "#header{color:#4d926f}h2{color:#4d926f}";

                var arguments = new Dictionary <string, object> {
                    {
                        "item",
                        new Dictionary <string, object> {
                            { "filename", Path.Combine("a", "b", "c.less") }
                        }
                    }
                };

                var fileSystem = Substitute.For <IFileSystem>();

                var lessFilter = new LessFilter(fileSystem);

                string result = lessFilter.Execute(source, arguments);

                result.ShouldBe(expected);
            }
Ejemplo n.º 2
0
            public void should_call_file_exists_on_file_system()
            {
                lessFilter.Execute(source, arguments);

                fileSystem.Received().FileExists(dependencyFilename);
            }