Ejemplo n.º 1
0
            public void Spec04()
            {
                try
                {
                    ConstructorHelper.CreateJSLint(string.Format("var JSLINT = {{ edition: '{0}' }};", AssemblyInfo.Edition));

                    using (new JSLintContext())
                    {
                    }
                }
                finally
                {
                    ConstructorHelper.DeleteJSLint();
                }
            }
Ejemplo n.º 2
0
            public void Spec03()
            {
                try
                {
                    ConstructorHelper.CreateJSLint("var JSLINT = { edition: '3000-01-01' };");

                    using (new JSLintContext())
                    {
                    }
                }
                finally
                {
                    ConstructorHelper.DeleteJSLint();
                }
            }
Ejemplo n.º 3
0
            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();
                }
            }
Ejemplo n.º 4
0
            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();
                }
            }