public void ImageAsset_InitializeWithExistingFile_RemoveFileAndTryRead_ExpectException() { var testFile = testFileSystem.Path.Combine(mockFolderParth, TestJpegFile1FileName); var sut = new ImageAsset(testFileSystem, testFile); sut.Should().NotBeNull(); sut.Title.Should().Be(string.Empty); this.testFileSystem.RemoveFile(testFile); Assert.Throws <FileNotFoundException>(() => sut.ReadMetaData()); }
public void ImageAsset_LoadTestFileWithKnownMetadata_VerifyReadCorrectly() { var sut = new ImageAsset(testFileSystem, testFileSystem.Path.Combine(mockFolderParth, TestJpegFile1FileName)); sut.Should().NotBeNull(); // just double check setup sut.Title.Should().Be(string.Empty); sut.Description.Should().Be(string.Empty); sut.Keywords.Should().BeEquivalentTo(new List <string>()); sut.ReadMetaData(); sut.Title.Should().Be(testJpegFile1Title); sut.Description.Should().Be(testJpegFile1Description); sut.Keywords.Should().BeEquivalentTo(testJpegFile1Keywords); }