public void ThrowWhenNull() { var strategy = new NullNotAllowedStrategy(); Assert.Throws <CoerceVariableFailException>(() => { strategy.CoerceValue("foo", null); }); }
public void ReturnOriginalWhenNotNull() { var strategy = new NullNotAllowedStrategy(); var expected = 123.45; var actual = strategy.CoerceValue("foo", expected); Assert.Equal(expected, actual); }