private void GetAssertBuilderOutput(AssertBuilder codeGen, Type target) { ObjectXRay xray = ObjectXRay.NewType(typeof(AssertBuilder), codeGen); xray.SetProperty("TestMode", true); codeGen.Generate(target); Console.WriteLine("Assert.AreEqual(@\"" + EncodeForString(codeGen.GetEmittedCode()) + "\", codeGen.GetEmittedCode());"); }
public void AssertBuilderDemo() { // Arrange, Act var car = new Car(); // Assert AssertBuilder.Generate(car, "car"); // Look in the error message and you will see the asserts }