private void registerBindersAndPolicies() { ClassUnderTest.AddBinder(_binder1); ClassUnderTest.AddBinder(_binder2); ClassUnderTest.Apply(_policy1); ClassUnderTest.Apply(_policy2); }
public void add_binder_register_the_binders_and_use_them_when_building_items() { var invoked = false; var binder = new FakeTemplateBinder(); binder.Action += x => invoked = true; ClassUnderTest .AddBinder(binder) .AddBinder <OtherTemplateBinder>(); ClassUnderTest.Compose(_templateRegistry); invoked.ShouldBeTrue(); OtherTemplateBinder.Invoked.ShouldBeTrue(); }