public void ReturnsNullIfValueIsNull() { var value = ValueRetrieval.GetDateTime(null); Assert.That(value, Is.EqualTo(null)); }
public void ReturnsTrueIfValueIsNullAndFallbackIstrue() { var value = ValueRetrieval.GetBoolean(null, true); Assert.That(value, Is.EqualTo(true)); }
public void ReturnsFalseIfValueIsasdfAndFallbackIsfalse() { var value = ValueRetrieval.GetBoolean("asdf", false); Assert.That(value, Is.EqualTo(false)); }
public void ReturnsTrueIfValueIsTRUE() { var value = ValueRetrieval.GetBoolean("TRUE"); Assert.That(value, Is.EqualTo(true)); }
public void ReturnsFalseIfValueIsFALSE() { var value = ValueRetrieval.GetBoolean("FALSE"); Assert.That(value, Is.EqualTo(false)); }
public void ReturnsNullIfValueIsasdf() { var value = ValueRetrieval.GetObject <TestObject>("asdf"); Assert.That(value, Is.EqualTo(null)); }
public void ReturnsTestObjectIfValueIsATestObject() { var value = ValueRetrieval.GetObject <TestObject>("{\"On\": \"true\"}"); Assert.That(value.On, Is.EqualTo(true)); }
public void Returns1Point3IfValueIsNullAndFallbackIs1Point3() { var value = ValueRetrieval.GetDouble(null, (double)1.3); Assert.That(value, Is.EqualTo((double)1.3)); }
public void Returns2Point7IfValueIsasdfAndFallbackIs2Point7() { var value = ValueRetrieval.GetDouble("asdf", (double)2.7); Assert.That(value, Is.EqualTo((double)2.7)); }
public void ReturnsNullIfValueIsasdf() { var value = ValueRetrieval.GetDecimal("asdf"); Assert.That(value, Is.EqualTo(null)); }
public void Returns1Point12IfValueIs1Point12() { var value = ValueRetrieval.GetDouble("1.12"); Assert.That(value, Is.EqualTo((double)1.12)); }
public void ReturnsNullIfValueIsasdf() { var value = ValueRetrieval.GetBoolean("adsf"); Assert.That(value, Is.EqualTo(null)); }
public void Returns15IfValueIsasdfAndFallbackIs15() { var value = ValueRetrieval.GetInteger("asdf", 15); Assert.That(value, Is.EqualTo(15)); }
public void Returns10IfValueIsNullAndFallbackIs10() { var value = ValueRetrieval.GetInteger(null, 10); Assert.That(value, Is.EqualTo(10)); }
public void Returns1IfValueIs1() { var value = ValueRetrieval.GetInteger("1"); Assert.That(value, Is.EqualTo(1)); }
public void ReturnsDateTimeObjectIfValueIsasdfAndFallbackIsAValidDateTime() { var value = ValueRetrieval.GetDateTime("adsf", DateTime.Parse("2018-02-06T12:35:45.970Z")); Assert.That(value.Value.ToString(), Is.EqualTo("06/02/2018 12:35:45")); }