private string Transform(string less, TestPath path) { var engine = new EngineFactory().GetEngine(); engine.CurrentDirectory = path.Directory; return engine.TransformToCss(less, path.FileName); }
private string Transform(string less, TestPath path) { var engine = new EngineFactory().GetEngine(); engine.CurrentDirectory = path.Directory; return(engine.TransformToCss(less, path.FileName)); }
private static ITestCaseData CreateTestCase(TestPath path, IDictionary <string, string> ignores) { var testCase = new TestCaseData(path).SetName(path.TestName); if (ignores.ContainsKey(path.Ignore)) { testCase.Ignore(ignores[path.Ignore] ?? "From ignore.txt"); } return(testCase); }
private ITestCaseData CreateTestCase(TestPath path, IDictionary<string, string> ignores) { var testCase = new TestCaseData(path).SetName(path.TestName); if (ignores.ContainsKey(path.Ignore)) { testCase.Ignore(ignores[path.Ignore]); } return testCase; }
private IEnumerable <ITestCaseData> LoadTestCases() { var projectDir = ConfigurationManager.AppSettings["lessJsProjectDirectory"]; var differencesDir = ConfigurationManager.AppSettings["differencesDirectory"]; var ignoreFile = ConfigurationManager.AppSettings["ignoreFile"]; var testPaths = TestPath.LoadAll(projectDir, differencesDir); var ignores = Ignore.Load(ignoreFile); return(testPaths.Select(t => CreateTestCase(t, ignores))); }
public void TestCompatiblity(TestPath path) { var less = File.ReadAllText(path.Less); var expectedCss = File.ReadAllText(path.Css); var css = Transform(less, path); if (CompareOutput(css, expectedCss) != 0) { Dump(path.DebugLess, less); Dump(path.ActualCss, css); Dump(path.ExpectedCss, expectedCss); } Assert.That(css, Is.EqualTo(expectedCss).Using <string>(new Comparison <string>(CompareOutput))); }
public void TestCompatiblity(TestPath path) { var less = File.ReadAllText(path.Less); var expectedCss = File.ReadAllText(path.Css); var css = Transform(less, path); if (CompareOutput(css, expectedCss) != 0) { Dump(path.DebugLess, less); Dump(path.ActualCss, css); Dump(path.ExpectedCss, expectedCss); } Assert.That(css, Is.EqualTo(expectedCss).Using<string>(CompareOutput)); }