public void Spec04() { try { ConstructorHelper.CreateJSLint(string.Format("var JSLINT = {{ edition: '{0}' }};", AssemblyInfo.Edition)); using (new JSLintContext()) { } } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec03() { try { ConstructorHelper.CreateJSLint("var JSLINT = { edition: '3000-01-01' };"); using (new JSLintContext()) { } } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec02() { try { ConstructorHelper.CreateJSLint("not.actually.jslint;"); using (new JSLintContext()) { } Assert.True(false, "Expected exception given invalid JSLint file."); } catch { } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec01() { try { ConstructorHelper.CreateJSLint("var JSLINT = { edition: '2000-01-01' };"); var exception = I.Expect(() => { using (new JSLintContext()) { } }).ToThrow(); I.Expect(exception.Message).ToContain("edition"); } finally { ConstructorHelper.DeleteJSLint(); } }