public void Given_Empty_Value_Should_Return_True_In_IsUnformatted() { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.True(formatter.IsUnformatted("")); }
public void Given_Formatted_Value_Should_Be_True_In_IsFormatted() { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.True(formatter.IsFormatted(FormattedValue)); }
public void Given_Valid_Format_Value_Should_Be_True_In_IsFormattable(string value) { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.True(formatter.IsFormattable(value)); }
public void Given_Null_Value_Should_Throw_Exception_In_Unformat() { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.Throws <ArgumentNullException>(() => formatter.Unformat(null)); }
public void Given_Invalid_Format_Value_Should_Throw_Exception_In_Unformat() { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.Throws <InvalidOperationException>(() => formatter.Unformat(InvalidFormat)); }
public void Given_Valid_Format_Value_Should_Not_Throw_Exception_In_AssertFormattable(string value) { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert formatter.AssertFormattable(value); }
public void Given_Invalid_Format_Value_Should_False_In_IsUnformatted() { // Arrange IFormatter formatter = new TestedFormatter(); // Act and Assert Assert.False(formatter.IsUnformatted(InvalidFormat)); }
public void Given_Empty_Value_Should_Return_Empty_In_Unformat() { // Arrange IFormatter formatter = new TestedFormatter(); // Act var unformattedTest = formatter.Unformat(""); // Assert Assert.Equal("", unformattedTest); }
public void Given_Unformatted_Value_Should_Continue_Unformatted_In_Unformat() { // Arrange IFormatter formatter = new TestedFormatter(); // Act var formattedTest = formatter.Unformat(UnformattedValue); // Assert Assert.Equal(UnformattedValue, formattedTest); }