public void GenerateCode_Builders_CalledWithContext()
		{
			ICodeGeneratorContext codeGeneratorContext = new CodeGeneratorContext(metadataSet, codeGeneratorOptions);

			Mock<IWsdlImporterBuilder> wsdlImportBuilder = new Mock<IWsdlImporterBuilder>();
			wsdlImportBuilder.Setup(mock => mock.Build(codeGeneratorContext))
				.Returns(new WsdlImporter(metadataSet)).AtMostOnce();

			Mock<IServiceContractGeneratorBuilder> contractGeneratorBuilder = new Mock<IServiceContractGeneratorBuilder>();
			Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
			contractGeneratorBuilder.Setup(mock => mock.Build(codeGeneratorContext))
				.Returns(new ServiceContractGenerator(codeGeneratorContext.CodeCompileUnit, configuration)).AtMostOnce();

			ICodeGenerator codeGenerator = new CodeGenerator(wsdlImportBuilder.Object, contractGeneratorBuilder.Object);
			codeGenerator.GenerateCode(codeGeneratorContext);

			wsdlImportBuilder.Verify();
			contractGeneratorBuilder.Verify();
		}
		private CodeCompileUnit GenerateCode(CodeGeneratorOptions options)
		{
			ICodeGeneratorContext codeGeneratorContext = new CodeGeneratorContext(metadataSet, options);

			WsdlImporterBuilder wsdlImporterBuilder = new WsdlImporterBuilder(
				new XmlSerializerImportOptionsBuilder(),
				new XsdDataContractImporterBuilder(),
				new WrappedOptionsBuilder(),
				new FaultImportOptionsBuilder());

			ServiceContractGeneratorBuilder contractGeneratorBuilder = new ServiceContractGeneratorBuilder(
				new ServiceContractGenerationOptionsBuilder());

			ICodeGenerator codeGenerator = new CodeGenerator(wsdlImporterBuilder, contractGeneratorBuilder);

			return codeGenerator.GenerateCode(codeGeneratorContext);
		}