Beispiel #1
0
        public void Compile_ValidLess_Compiles()
        {
            var file = new FileInfo("../../Data/exampleLess.less");
            var compiler = new LessCompiler(_executor);
            var styl = File.ReadAllText("../../Data/exampleLess.less");

            var output = compiler.Compile(styl, file).Result;

            Assert.AreEqual(".base {\n  border-color: #ccc;\n}\n\n", output);
        }
Beispiel #2
0
        public void Compile_InvalidLessFile_Exception()
        {
            var file = new FileInfo("../../Data/invalidLess.less");
            var styl = File.ReadAllText("../../Data/invalidLess.less");
            var compiler = new LessCompiler(_executor);

            try
            {
                var output = compiler.Compile(styl, file).Result;
            }
            catch (AggregateException e)
            {
                throw e.InnerException;
            }
        }