public void GetPhysicalPath_LowResolution_ExpectedPathReturned() { var file = new File(userName: "******", fileName: "test.jpg") { ResolutionsCreated = FileResolution.Low }; var expected = File.UsersFolderPhysicalPath() + file.UserName + "/" + file.FileID + "-low.jpg"; var actual = file.GetPhysicalPath(FileResolution.Low); Assert.AreEqual(expected, actual); }
public void GetPhysicalPath_OriginalResolution_ExpectedPathReturned() { var file = new File(userName: "******", fileName: "test.jpg"); var expected = File.UsersFolderPhysicalPath() + file.UserName + "/" + file.FileID + ".jpg"; var actual = file.GetPhysicalPath(); Assert.AreEqual(expected, actual); }
public void GetPhysicalPath_AfterSettingANewResolution_ExpectedPathReturned() { var file = new File(userName: "******", fileName: "test.jpg"); var res = FileResolution.Low; file.ResolutionsCreated = file.ResolutionsCreated.AddRes(res); var expected = File.UsersFolderPhysicalPath() + file.UserName + "/" + file.FileID + "-low.jpg"; var actual = file.GetPhysicalPath(res); Assert.AreEqual(expected, actual); }