Inheritance: StatePrinting.TestAssistance.FileRepository
        public void Rewriter_calls_to_testframework_autorewriting()
        {
            var printer = TestHelper.CreateTestPrinter();

            var fakeReadContent = new System.Text.UTF8Encoding(true).GetBytes(TestFileContent);
            var mock = new FileRepositoryMock(fakeReadContent);
            printer.Configuration.FactoryFileRepository = () => mock;
            printer.Configuration.Test.SetAutomaticTestRewrite(x => true);

            var assertMock = new AreEqualsMethodMock();
            printer.Configuration.Test.SetAreEqualsMethod(assertMock.AreEqualsMock);

            string expected = "boo";
            printer.Assert.AreAlike(expected, "actul");

            Assert.AreEqual("boo", assertMock.Expected);
            Assert.AreEqual("actul", assertMock.Actual);
            Assert.IsTrue(assertMock.Message.StartsWith("Rewritting test expectations in '"));
            Assert.IsTrue(assertMock.Message.EndsWith(@"'.
            Compile and re-run to see green lights.
            New expectations:
            ""actul"""));
            Assert.IsTrue(mock.WritePath.EndsWith("ReWriterMockedTests.cs"));
        }