public void ShouldThrowExceptionForNullText() { Text notNull = new NotNull(null); Action action = () => notNull.String(); action.ShouldThrowExactly <Exception>().WithMessage("NULL instead of a valid text"); }
public void ShouldReturnInputAsString() { Text text = new TextOf("val"); Text notNull = new NotNull(text); notNull.String().Should().Be("val"); }
public void ShouldThrowExceptionForNullTextValue() { Text text = new TextOf((string)null); Text notNull = new NotNull(text); Action action = () => notNull.String(); action.ShouldThrowExactly <Exception>().WithMessage("NULL instead of a valid result string"); }