public void GetInt32_Nominal() { var node = new StringKeyValueNode("bob", "123"); var observedResult = node.GetInt32(); Assert.Equal(123, observedResult); }
public void GetInt32_ReturnMinusOne_WhenNull() { var node = new StringKeyValueNode("bob", null); var observedResult = node.GetInt32(); Assert.Equal(-1, observedResult); }
public void GetInt32_ThrowException_When_NotNumber() { var node = new StringKeyValueNode("bob", "123N"); Assert.Throws <InvalidDataException>(delegate { // ReSharper disable once UnusedVariable var observedResult = node.GetInt32(); }); }