public void can_increase_warehouse_items() { var repo = new XpoRepository(m_unitOfWork); var part = repo.Create <FakePart>(); var domain = repo.Create <FakeDomain>(); var warehouse = new MaterialsWarehouseInventory(repo); warehouse.IncreaseItemQuantity(part, domain, null, 5); repo.Save(); var item = repo.Get <MaterialWarehouseItem>(i => i.Part.Id == 1); Assert.That(item.Qty == 5); }
public void can_save_to_repository() { var repo = new XpoRepository(Xpo.UnitOfWork()); var entity = repo.Create <XpoTestEntity>(); entity.Name = "Test"; entity.Type = "test"; repo.Save(); var repoItem = repo.Get <XpoTestEntity>(i => i.Name == "Test"); Assert.IsNotNull(repoItem); }