public void BeforeAllTests() { var description = new ContractDescription(typeof(ISomeContract)); var moduleBuilder = ProxyAssembly.CreateModule(nameof(EmitClientBuilderBuilderTest)); _sut = new EmitClientBuilderBuilder(description, typeof(ContractMock), typeof(ClientMock)); _builderType = _sut.Build(moduleBuilder); }
public void BeforeAllTests() { _description = new ContractDescription(typeof(IContract)); var builder = new EmitContractBuilder(_description); _contractType = builder.Build(ProxyAssembly.CreateModule(nameof(EmitContractBuilderTest))); _factory = EmitContractBuilder.CreateFactory(_contractType); }
public void BeforeAllTests() { var description = new ContractDescription(typeof(IGenericContract <int, string>)); var moduleBuilder = ProxyAssembly.CreateModule(nameof(EmitClientBuilderGenericTest)); var contractBuilder = new EmitContractBuilder(description); var contractType = contractBuilder.Build(moduleBuilder); var contractFactory = EmitContractBuilder.CreateFactory(contractType); var sut = new EmitClientBuilder(description, contractType); var clientType = sut.Build(moduleBuilder); var clientFactory = sut.CreateFactory <IGenericContract <int, string> >(clientType); Factory = () => clientFactory(CallInvoker.Object, contractFactory(DataContractMarshallerFactory.Default), null); }