public void Null_Value_Returns_Blank_CommentType(object input) { // Arrange var handler = new CommentTypeTypeHandler(); // Act var result = handler.Parse(input); // Assert Assert.Same(CommentType.Blank, result); }
public void Valid_Value_Returns_CommentType(string input, CommentType expected) { // Arrange var handler = new CommentTypeTypeHandler(); // Act var result = handler.Parse(input); // Assert Assert.Same(expected, result); }
public void Sets_Value_To_CommentType_Name(string expected, CommentType input) { // Arrange var handler = new CommentTypeTypeHandler(); var parameter = Substitute.For <IDbDataParameter>(); // Act handler.SetValue(parameter, input); // Assert parameter.Received().Value = expected; }
public void Invalid_Value_Returns_Blank_CommentType() { // Arrange var value = Rnd.Str; var handler = new CommentTypeTypeHandler(); // Act var result = handler.Parse(value); // Assert Assert.Same(CommentType.Blank, result); }