예제 #1
0
            public void Spec01()
            {
                using (var testable = new OnProjectNodeSettingsTestable())
                {
                    testable.Initialize();
                    testable.MenuCommand.Invoke(testable.MenuCommand);

                    testable.ViewMock.Verify(x => x.ShowDialog());
                }
            }
예제 #2
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));
                }
            }
예제 #3
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());
                }
            }
예제 #4
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>()));
                }
            }