public void PrintClassWithPropertyThatThrowsExceptionPrintsException() { // Arrange MockObjectVisitor visitor = CreateObjectVisitor(); ClassWithPropertyThatThrowsException value = new ClassWithPropertyThatThrowsException(); // Act visitor.Print(value); // Assert Assert.Equal("int MyProperty = Property accessor 'MyProperty' on object 'System.Web.Helpers.Test.ObjectInfoTest+ClassWithPropertyThatThrowsException' threw the following exception:'Property that shows an exception'", visitor.Members[0]); }