public void TestComplexTypeBuilderCreateComplexType(string name, IComplexTypeFactory complexTypeFactory, IConventions conventions, IComplexType expectedComplexType) { this.Output.WriteLine("Test Name: {0}", name); this.Output.WriteLine(String.Empty); // Arrange var serializerSettings = new JsonSerializerSettings { Converters = new[] { (JsonConverter) new StringEnumConverter() }, Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Include }; var expectedJson = expectedComplexType.ToJson(serializerSettings); this.Output.WriteLine("Expected ComplexType"); this.Output.WriteLine(expectedJson); // Act var actualComplexType = complexTypeFactory.Create(conventions); this.Output.WriteLine(String.Empty); var actualJson = actualComplexType.ToJson(serializerSettings); this.Output.WriteLine("Actual ComplexType"); this.Output.WriteLine(actualJson); // Assert ComplexTypeAssert.Equal(expectedComplexType, actualComplexType); }