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"));
        }
Beispiel #2
0
        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"));
        }
Beispiel #3
0
 public ActivateWindowsUsingKms(IExecutableProcessQueue executableProcessQueue, IOperatingSystemChecker operatingSystemChecker)
 {
     _executableProcessQueue = executableProcessQueue;
     _operatingSystemChecker = operatingSystemChecker;
 }
Beispiel #4
0
 public void Setup()
 {
     _exec = MockRepository.GenerateMock <IExecutableProcessQueue>();
     _operatingSystemChecker = MockRepository.GenerateMock <IOperatingSystemChecker>();
     _systemInformation      = MockRepository.GenerateMock <ISystemInformation>();
 }
 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 Unrescue(IExecutableProcessQueue exec, IOperatingSystemChecker operatingSystemChecker, ISystemInformation systemInformation)
 {
     _exec = exec;
     _operatingSystemChecker = operatingSystemChecker;
     _systemInformation      = systemInformation;
 }
 public Unrescue(IExecutableProcessQueue exec, IOperatingSystemChecker operatingSystemChecker, ISystemInformation systemInformation)
 {
     _exec = exec;
     _operatingSystemChecker = operatingSystemChecker;
     _systemInformation = systemInformation;
 }