Exemple #1
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()
                                )
                            )
                        )
                    )
                );

            FilesystemAssertionRepository.SetFilesystemFilenameRemovePrefix(_assert, "ExpressiveAssertions.Tests.");
            var assertPath = System.IO.Path.Combine("..", "..", "..", "assertions",
                                                    FilesystemAssertionRepository.SanitizeFilename(_assert, TestContext.FullyQualifiedTestClassName),
                                                    FilesystemAssertionRepository.SanitizeFilename(_assert, TestContext.TestName)
                                                    );

            FilesystemAssertionRepository.SetFilesystemAssertionRepositoryPath(_assert, assertPath);
        }
Exemple #2
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);
        }