Beispiel #1
0
        public void Test002()
        {
            var d1 = DateTimeNormalizationEvaluator.NormalizeDateTime(DateTime.Now);
            var d2 = new DateTime(d1.Ticks + TimeSpan.TicksPerMillisecond - 1);

            _introspective.ExpectAssertionSuccessNext();
            _assert.AreEqual(() => d1, () => d2);
        }
Beispiel #2
0
        public void Test004()
        {
            var d1 = DateTimeNormalizationEvaluator.NormalizeDateTime(DateTime.Now);
            var d2 = new DateTime(d1.Ticks - 1);

            _introspective.ExpectAssertionSuccessNext();
            _assert.AreNotEqual(() => d1, () => d2);
        }
Beispiel #3
0
        public virtual void Init()
        {
            _assert = ExpressiveAssertions.Tooling.AssertionRendererTool.Create(
                CompositeAssertionTool.Create(
                    ExpressiveAssertions.Tooling.AssertionRendererTool.Create(
                        TraceLoggingAssertionTool.Create()
                        ),
                    _introspective = new IntrospectiveAssertionTool(
                        ExpressiveAssertions.Tooling.AssertionRendererTool.Create(
                            CompositeAssertionTool.Create(
                                TraceLoggingAssertionTool.Create(),
                                ExpressiveAssertions.MSTest.MSTestAssertionTool.Create()
                                )
                            )
                        )
                    )
                );

            var evaluator = new DateTimeNormalizationEvaluator(new DefaultEvaluator());

            _assert.SetExpressionEvaluator(evaluator);
        }