예제 #1
0
        public void GettingStringAsDatetimeThrows()
        {
            EventHeader sut = GetSut();

            var expected = "sdmnfö2342ütäerfd";

            sut.Set("foo", expected);

            Assert.Throws <InvalidCastException>(() => sut.GetDateTime("foo"));
        }
예제 #2
0
        public void ItCanSetAndGetDateTime()
        {
            DateTime expected = DateTime.Now;

            EventHeader sut = GetSut();

            sut.Set("foo", expected);

            DateTime result = sut.GetDateTime("foo");

            Assert.Equal(expected, result);
        }