Skip to content

Commit

Permalink
#1833 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Jan 21, 2025
1 parent 4487b73 commit 6a011da
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,20 @@ public async Task FileMove_SkipIfAlreadyExists()
var createAnImage = new CreateAnImage();

// first copy for parallel test
_thumbnailStorage.FileCopy(_fileName, "already_exists_file.jpg");
const string alreadyExistsFileName = "already_exists_file.jpg";
const string beforeTestFileName = "before_test_thumbnail.jpg";

_thumbnailStorage.FileCopy(_fileName, alreadyExistsFileName);
await _thumbnailStorage.WriteStreamAsync(StringToStreamHelper.StringToStream("1"),
"before_test_thumbnail");
beforeTestFileName);

_thumbnailStorage.FileMove("before_test_thumbnail", "already_exists_file.jpg");
_thumbnailStorage.FileMove(beforeTestFileName, alreadyExistsFileName);

Assert.AreEqual(CreateAnImage.Size, _thumbnailStorage.Info("already_exists_file").Size);
Assert.AreEqual(CreateAnImage.Size, _thumbnailStorage.Info(alreadyExistsFileName).Size);

File.Delete(Path.Combine(createAnImage.BasePath,
"already_exists_file.jpg"));
_thumbnailStorage.FileDelete("before_test_thumbnail");
alreadyExistsFileName));
_thumbnailStorage.FileDelete(beforeTestFileName);
}

[TestMethod]
Expand Down

0 comments on commit 6a011da

Please sign in to comment.