public void given_deactivated_when_dectivate_then_fails(Guid id, string name) { var itemBL = new InventoryItemLogic(id, name); itemBL.Deactivate(); itemBL.MarkChangesAsCommitted(); Assert.Throws <InvalidOperationException>(() => itemBL.Deactivate()); }
public void given_created_when_add_then_create_message_correct(Guid id, string name, int count) { var itemBL = new InventoryItemLogic(id, name); itemBL.MarkChangesAsCommitted(); itemBL.CheckIn(count, 0.1f); var events = itemBL.GetUncommittedChanges(); var checkedInEvent = events.First() as ItemsCheckedInToInventory; Assert.Equal(id, checkedInEvent.Id); Assert.Equal(count, checkedInEvent.Count); }