Skip to content
Andrew Best edited this page Mar 1, 2016 · 1 revision

Default failure assertion

To configure a default failure assertion method, use the default failure assertion callback (example using NUnit) in your global test setup

ConventionConfiguration.DefaultFailureAssertionCallback = Assert.Fail

Alternatively, you can assert failure by using the fluent syntax displayed in the above samples.

Default warning assertion

To configure a default warning assertion method, use the default warning assertion callback (example using NUnit) in your global test setup

ConventionConfiguration.DefaultWarningAssertionCallback = Assert.Inconclusive

Default current date resolution

Certain Conventional features rely on Conventional being able to resolve the current date, which by default it will via DateTime.UtcNow. If this does not work in your scenario, set the default current date resolver in your global test setup

ConventionConfiguration.DefaultCurrentDateResolver = DateTime.Now

Dealing with a funky folder structure?

Conventional assumes that your solution root will be three folders (..\..\..\) from where the tests are running. If it is not set your solution root in your global test setup

KnownPaths.SolutionRoot = @"c:\projects\MySolutionRoot"