public void GettingStringAsDatetimeThrows() { EventHeader sut = GetSut(); var expected = "sdmnfö2342ütäerfd"; sut.Set("foo", expected); Assert.Throws <InvalidCastException>(() => sut.GetDateTime("foo")); }
public void ItCanSetAndGetDateTime() { DateTime expected = DateTime.Now; EventHeader sut = GetSut(); sut.Set("foo", expected); DateTime result = sut.GetDateTime("foo"); Assert.Equal(expected, result); }