Exemplo n.º 1
0
        public void OnLunchTimePlusMinus5Seconds_WithLuchTimeMinusMoreThan5Seconds_ShouldFail()
        {
            CloseToAssertion assertion = CloseToAssertion(Times.LunchTime(), 5.Seconds());
            var result = assertion.AssertValue(Times.LunchTime().AddSeconds(-5).AddMilliseconds(-1));

            Assert.IsFalse(result.succeeded);
            Assert.AreEqual("11/16/1984 11:59:54.999", result.actualValueString);
            Assert.AreEqual("(expected between 11/16/1984 11:59:55.000 and 11/16/1984 12:00:05.000)", result.expectationString);
        }