public void Spec04()
            {
                var target = new JSLintNetSettings();

                target.Options = new JSLintOptions()
                {
                    MaximumErrors = 2,
                    AssumeBrowser = true
                };

                var merge = new JSLintNetSettings();

                merge.Options = new JSLintOptions()
                {
                    MaximumErrors = 4,
                    AssumeES6     = true
                };

                target.Merge(merge);

                I.Expect(target.Options.MaximumErrors).ToBe(4);
                I.Expect(target.Options.AssumeBrowser).ToBeTrue();
                I.Expect(target.Options.AssumeES6).ToBeTrue();
                I.Expect(target.Options.TolerateEval).ToBeNull();
            }
Пример #2
0
            public void Spec04()
            {
                var target = new JSLintNetSettings();

                target.Options = new JSLintOptions()
                {
                    IndentationFactor = 2,
                    AssumeBrowser     = true
                };

                var merge = new JSLintNetSettings();

                merge.Options = new JSLintOptions()
                {
                    IndentationFactor        = 4,
                    TolerateUnusedParameters = true
                };

                target.Merge(merge);

                I.Expect(target.Options.IndentationFactor).ToBe(4);
                I.Expect(target.Options.AssumeBrowser).ToBeTrue();
                I.Expect(target.Options.TolerateUnusedParameters).ToBeTrue();
                I.Expect(target.Options.TolerateUncapitalizedConstructors).ToBeNull();
            }
            public void Spec06()
            {
                var target = new JSLintNetSettings();

                target.Options = new JSLintOptions();

                var merge = new JSLintNetSettings();

                merge.Options = null;

                target.Merge(merge);

                I.Expect(target.Options).Not.ToBeNull();
            }
            public void Spec03()
            {
                var target = new JSLintNetSettings();

                target.Ignore.Add("unique");

                var merge = new JSLintNetSettings();

                merge.Ignore.Add("unique");

                target.Merge(merge);

                I.Expect(target.Ignore).ToContain("unique");
                I.Expect(target.Ignore.Count).ToBe(1);
            }
            public void Spec02()
            {
                var target = new JSLintNetSettings();

                target.Ignore.Add("target");

                var merge = new JSLintNetSettings();

                merge.Ignore.Add("merge");

                target.Merge(merge);

                I.Expect(target.Ignore).ToContain("target");
                I.Expect(target.Ignore).ToContain("merge");
            }
            public void Spec01()
            {
                var target = new JSLintNetSettings()
                {
                    Output = Output.Error
                };

                var merge = new JSLintNetSettings()
                {
                    Output = Output.Message
                };

                target.Merge(merge);

                I.Expect(target.Output).Not.ToBe(Output.Error);
                I.Expect(target.Output).ToBe(Output.Message);
            }
            public void Spec07()
            {
                var target = new JSLintNetSettings();

                target.ErrorLimit  = 50;
                target.RunOnBuild  = false;
                target.CancelBuild = true;

                var merge = new JSLintNetSettings();

                merge.ErrorLimit = 100;
                merge.RunOnBuild = true;
                merge.RunOnSave  = false;

                target.Merge(merge);

                I.Expect(target.ErrorLimit).ToBe(100);
                I.Expect(target.RunOnBuild).ToBeTrue();
                I.Expect(target.CancelBuild).ToBeTrue();
                I.Expect(target.RunOnSave).ToBeFalse();
            }