public void FileExistsWithEmptyVirtualPath() { // Arrange bool expected = false; var settings = this.Settings; IVirtualImageProvider target = new MongoReaderPlugin(settings); // Act var actual = target.FileExists(string.Empty, null); // Assert Assert.Equal <bool>(expected, actual); }
public void FileExistsWithNullVirtualPath() { // Arrange var settings = this.Settings; IVirtualImageProvider target = new MongoReaderPlugin(settings); // Act var actual = Assert.Throws <NullReferenceException>(() => target.FileExists(null, null)); // Assert Assert.NotNull(actual); Assert.IsType <NullReferenceException>(actual); }
public void FileExistFileNotExisting() { // Arrange bool expected = true; var settings = this.Settings; string virtualPath = Path.Combine(settings["prefix"], dummyDatabaseRecordId.ToString("B")); IVirtualImageProvider target = new MongoReaderPlugin(settings); // Act bool actual = target.FileExists(virtualPath, new NameValueCollection()); // Assert Assert.Equal <bool>(expected, actual); }
public void FileExistsWithoutVirtualPath() { // Arrange bool expected = false; var settings = this.Settings; string virtualPath = dummyDatabaseRecordId.ToString("B"); IVirtualImageProvider target = new MongoReaderPlugin(settings); // Act bool actual = target.FileExists(virtualPath, null); // Assert Assert.Equal <bool>(expected, actual); }
public void FileExistsFileExisting() { // Arrange string id = this.CreateFileInDatabase(); bool expected = true; var settings = this.Settings; string virtualPath = Path.Combine(settings["prefix"], id); IVirtualImageProvider target = new MongoReaderPlugin(settings); // Act bool actual = target.FileExists(virtualPath, new NameValueCollection()); // Assert Assert.Equal <bool>(expected, actual); }