SetAreEqualsMethod() public method

Configure how to call AreEquals in the unit testing framework of your choice. Only set this field if you are using the Stateprinter.Assert functionality.
public SetAreEqualsMethod ( TestFrameworkAreEqualsMethod areEqualsMethod ) : Configuration
areEqualsMethod TestFrameworkAreEqualsMethod
return Configuration
Beispiel #1
0
        /// <summary>
        /// Instantiate using the <see cref="DefaultIndention"/> and the <see cref="CurlyBraceStyle"/>
        /// </summary>
        public Configuration(
            string indentIncrement = DefaultIndention,
            TestFrameworkAreEqualsMethod areEqualsMethod = null)
        {
            IndentIncrement = indentIncrement;
            OutputFormatter = new CurlyBraceStyle(this);
            NewLineDefinition = Environment.NewLine;
            LegacyBehaviour = new LegacyBehaviour();

            Test = new TestingBehaviour(this);
            Test.SetAutomaticTestRewrite(x => false);
            Test.SetAssertMessageCreator(new DefaultAssertMessage().Create);

            if(areEqualsMethod != null)
                Test.SetAreEqualsMethod(areEqualsMethod);
        }
        /// <summary>
        /// Instantiate using the <see cref="DefaultIndention"/> and the <see cref="CurlyBraceStyle"/>
        /// </summary>
        public Configuration(
            string indentIncrement = DefaultIndention,
            TestFrameworkAreEqualsMethod areEqualsMethod = null)
        {
            IndentIncrement   = indentIncrement;
            OutputFormatter   = new CurlyBraceStyle(this);
            NewLineDefinition = Environment.NewLine;
            LegacyBehaviour   = new LegacyBehaviour();

            Test = new TestingBehaviour(this);
            Test.SetAutomaticTestRewrite(x => false);
            Test.SetAssertMessageCreator(new DefaultAssertMessage().Create);

            if (areEqualsMethod != null)
            {
                Test.SetAreEqualsMethod(areEqualsMethod);
            }
        }