public ReservedItemMapperTest() { Fixture fixture = new Fixture { RepeatCount = 1 }; fixture.Behaviors.Remove(new ThrowingRecursionBehavior()); fixture.Behaviors.Add(new OmitOnRecursionBehavior()); fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book))); fixture.Customizations.Add(new TypeRelay(typeof(ItemBusinessModel), typeof(BookBusinessModel))); this.item = fixture.Create<ReservedItem>(); this.itemModel = fixture.Create<ReservedItemBusinessModel>(); }
public ReservedItemFacadeTests() { this.fixture = new Fixture(); this.fixture.Behaviors.Remove(new ThrowingRecursionBehavior()); this.fixture.Behaviors.Add(new OmitOnRecursionBehavior()); this.fixture.Customizations.Add(new TypeRelay(typeof(Item), typeof(Book))); this.testItem = this.fixture.Create<Item>(); this.testResItem = this.fixture.Create<ReservedItem>(); this.testResItem.Item = this.testItem; this.uow = Initializer.GetLibraryUow(); this.uow.Items.Add(this.testItem); this.uow.ReservedItems.Add(this.testResItem); this.resItemsFacade = new ReservedItemsFacade(this.uow); }