public void should_run_bcd_edit_scripts_excluding_ntldr_call_when_windows_2008_r2() { var bcdDataStore = new Dictionary <string, string> { { SystemInformation.DRIVE_KEY, @"F:\" }, { SystemInformation.UNIQUE_IDENTIFIER_KEY, "{my unique identifier}" } }; _exec.Stub(x => x.Enqueue(Arg <string> .Is.Anything, Arg <string> .Is.Anything)).Return(_exec); _exec.Stub(x => x.Enqueue(Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <bool> .Is.Anything)).Return(_exec); _exec.Expect(x => x.Go()).Repeat.Once(); _operatingSystemChecker.Stub(x => x.IsWindows2008).Return(true); _systemInformation.Stub(x => x.getDriveWithBootConfigurationDataStore()) .Return(bcdDataStore); _systemInformation.Stub(x => x.getDriveLetterWithOriginalWindowsFolder()).Return("E:"); new Unrescue(_exec, _operatingSystemChecker, _systemInformation).Execute(null); _exec.Replay(); _exec.AssertWasCalled(x => x.Enqueue("bcdedit", @"/store F:\boot\bcd /set {my unique identifier} osdevice partition=E:")); _exec.AssertWasCalled(x => x.Enqueue("bcdedit", @"/store F:\boot\bcd /set {my unique identifier} device partition=E:")); _exec.AssertWasCalled(x => x.Enqueue("bcdedit", @"/store F:\boot\bcd /set {bootmgr} device partition=E:")); _exec.AssertWasCalled(x => x.Enqueue("bcdedit", @"/store F:\boot\bcd /set {memdiag} device partition=E:")); _exec.AssertWasCalled(x => x.Enqueue("bcdedit", @"/store F:\boot\bcd /set {ntldr} device partition=E:", false)); _exec.AssertWasCalled(x => x.Go()); }