public void Spec01() { using (var testable = new OnProjectNodeSettingsTestable()) { testable.Initialize(); testable.MenuCommand.Invoke(testable.MenuCommand); testable.ViewMock.Verify(x => x.ShowDialog()); } }
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)); } }
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()); } }
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>())); } }