1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-10 13:02:47 +01:00

Updated tests to reflect using Copy instead of Move.

This commit is contained in:
Mark McDowall 2011-11-21 16:45:45 -08:00
parent a91c7bbff4
commit 50ee3f8d4d

View File

@ -141,7 +141,7 @@ public void should_create_backup_of_current_installation()
public void should_copy_update_package_to_target() public void should_copy_update_package_to_target()
{ {
Mocker.GetMock<DiskProvider>() Mocker.GetMock<DiskProvider>()
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER)); .Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER));
Mocker.Resolve<UpdateProvider>().Start(TARGET_FOLDER); Mocker.Resolve<UpdateProvider>().Start(TARGET_FOLDER);
} }
@ -150,7 +150,7 @@ public void should_copy_update_package_to_target()
public void should_restore_if_update_fails() public void should_restore_if_update_fails()
{ {
Mocker.GetMock<DiskProvider>() Mocker.GetMock<DiskProvider>()
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER)) .Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
.Throws(new IOException()); .Throws(new IOException());
//Act //Act
@ -195,7 +195,7 @@ public void should_restart_service_if_service_was_running_and_update_fails()
WithServiceRunning(true); WithServiceRunning(true);
Mocker.GetMock<DiskProvider>() Mocker.GetMock<DiskProvider>()
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER)) .Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
.Throws(new IOException()); .Throws(new IOException());
//Act //Act
@ -213,7 +213,7 @@ public void should_restart_process_if_service_was_not_running_and_update_fails()
WithServiceRunning(false); WithServiceRunning(false);
Mocker.GetMock<DiskProvider>() Mocker.GetMock<DiskProvider>()
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER)) .Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
.Throws(new IOException()); .Throws(new IOException());
//Act //Act