public void should_not_run_vbs_script_when_windows_2003() { exec = MockRepository.GenerateMock<IExecutableProcessQueue>(); exec.Expect(x => x.Enqueue(Arg<string>.Is.Anything, Arg<string>.Is.Anything)).Repeat.Never(); exec.Expect(x => x.Go()).Repeat.Never(); _operatingSystemChecker = MockRepository.GenerateMock<IOperatingSystemChecker>(); _operatingSystemChecker.Stub(x => x.IsWindows2008).Return(false); new ActivateWindowsUsingKms(exec, _operatingSystemChecker).Execute("server:port"); exec.AssertWasNotCalled(x => x.Enqueue("cscript", "c:\\windows\\system32\\slmgr.vbs /skms " + "server:port")); exec.AssertWasNotCalled(x => x.Enqueue("cscript", "c:\\windows\\system32\\slmgr.vbs /ato")); }
public void should_not_run_vbs_script_when_windows_2003() { exec = MockRepository.GenerateMock <IExecutableProcessQueue>(); exec.Expect(x => x.Enqueue(Arg <string> .Is.Anything, Arg <string> .Is.Anything)).Repeat.Never(); exec.Expect(x => x.Go()).Repeat.Never(); _operatingSystemChecker = MockRepository.GenerateMock <IOperatingSystemChecker>(); _operatingSystemChecker.Stub(x => x.IsWindows2008).Return(false); new ActivateWindowsUsingKms(exec, _operatingSystemChecker).Execute("server:port"); exec.AssertWasNotCalled(x => x.Enqueue("cscript", "c:\\windows\\system32\\slmgr.vbs /skms " + "server:port")); exec.AssertWasNotCalled(x => x.Enqueue("cscript", "c:\\windows\\system32\\slmgr.vbs /ato")); }
public ActivateWindowsUsingKms(IExecutableProcessQueue executableProcessQueue, IOperatingSystemChecker operatingSystemChecker) { _executableProcessQueue = executableProcessQueue; _operatingSystemChecker = operatingSystemChecker; }
public void Setup() { _exec = MockRepository.GenerateMock <IExecutableProcessQueue>(); _operatingSystemChecker = MockRepository.GenerateMock <IOperatingSystemChecker>(); _systemInformation = MockRepository.GenerateMock <ISystemInformation>(); }
public void Setup() { _exec = MockRepository.GenerateMock<IExecutableProcessQueue>(); _operatingSystemChecker = MockRepository.GenerateMock<IOperatingSystemChecker>(); _systemInformation = MockRepository.GenerateMock<ISystemInformation>(); }
public Unrescue(IExecutableProcessQueue exec, IOperatingSystemChecker operatingSystemChecker, ISystemInformation systemInformation) { _exec = exec; _operatingSystemChecker = operatingSystemChecker; _systemInformation = systemInformation; }