public void BusinessBaseFactory_Calls__Repository_Delete_with_Criteria()
        {
            BusinessBaseServerFactory<Product> _factory = new BusinessBaseServerFactory<Product>(_repository);

            _factory.Delete(new SingleCriteria<Product, int>(32));

            _repository.AssertWasCalled(x => x.Load(null, null), y => y.IgnoreArguments());
            _repository.AssertWasCalled(x => x.Delete(null),y=> y.IgnoreArguments());
            unitOfWorkStub.AssertWasCalled(x => x.TransactionalFlush());
        }
        public void BusinessBaseFactory_Calls_Repository_Delete_with_Object()
        {
            BusinessBaseServerFactory<Product> _factory = new BusinessBaseServerFactory<Product>(_repository);

            Product product = Product.GetOldProduct();
            _factory.Delete(product);

            _repository.AssertWasCalled(x => x.Delete(product));
            unitOfWorkStub.AssertWasCalled(x => x.TransactionalFlush());
        }