示例#1
0
            public void Spec00()
            {
                using (var testable = new OnProjectNodeSettingsTestable())
                {
                    testable.Initialize();
                    testable.MenuCommand.Invoke(testable.MenuCommand);

                    testable.Verify <IVisualStudioJSLintProvider>(x => x.LoadSettings(testable.ProjectMock.Object, false));
                }
            }
示例#2
0
            public void Spec03()
            {
                using (var testable = new OnProjectNodeSettingsTestable())
                {
                    testable.ViewMock
                    .Setup(x => x.ShowDialog())
                    .Returns(false);

                    testable.Initialize();
                    testable.MenuCommand.Invoke(testable.MenuCommand);

                    testable.Verify <IVisualStudioJSLintProvider>(x => x.SaveSettings(testable.ProjectMock.Object, testable.Settings), Times.Never());
                }
            }
示例#3
0
            public void Spec02()
            {
                using (var testable = new OnProjectNodeSettingsTestable())
                {
                    testable.ViewMock
                    .Setup(x => x.ShowDialog())
                    .Returns(true);

                    testable.Initialize();
                    testable.MenuCommand.Invoke(testable.MenuCommand);

                    testable.Verify <IVisualStudioJSLintProvider>(x => x.SaveSettings(testable.ProjectMock.Object, It.IsAny <JSLintNetSettings>()));
                }
            }