Skip to content

Instantly share code, notes, and snippets.

@benjanderson
Created November 30, 2016 02:15
Show Gist options
  • Save benjanderson/d410937d01053ab6a4a4c93a963792f7 to your computer and use it in GitHub Desktop.
Save benjanderson/d410937d01053ab6a4a4c93a963792f7 to your computer and use it in GitHub Desktop.
2 bindings autofixture
[TestMethod]
public void MyTestMethod()
{
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding1>();
var fixture1 = this.Container.Resolve<IFixture>();
fixture1.Create<Binding>();
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding2>();
var fixture2 = this.Container.Resolve<IFixture>();
var customBinding1 = fixture1.Create<Binding>();
var customBinding2 = fixture2.Create<Binding>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment