public void Valid_Value_Returns_MimeType(string input, MimeType expected) { // Arrange var handler = new MimeTypeTypeHandler(); // Act var result = handler.Parse(input); // Assert Assert.Same(expected, result); }
public void Null_Value_Returns_Blank_MimeType(object input) { // Arrange var handler = new MimeTypeTypeHandler(); // Act var result = handler.Parse(input); // Assert Assert.Same(MimeType.Blank, result); }
public void Invalid_Value_Returns_Blank_MimeType() { // Arrange var value = Rnd.Str; var handler = new MimeTypeTypeHandler(); // Act var result = handler.Parse(value); // Assert Assert.Same(MimeType.Blank, result); }
public void Sets_Value_To_MimeType_Name(string expected, MimeType input) { // Arrange var handler = new MimeTypeTypeHandler(); var parameter = Substitute.For <IDbDataParameter>(); // Act handler.SetValue(parameter, input); // Assert parameter.Received().Value = expected; }