public void CreateEntityShouldThrowOnInvalidInput(IEnumerable <object> productItemsList)
        {
            IDataProvider dataProvider = new InMemoryDataProvider <AppContext>();

            var testDelegate = new TestDelegate(() => dataProvider.CreateEntity(productItemsList));

            Assert.Throws <ArgumentException>(testDelegate);
        }
        public void FindEntityShouldReturnTheFoundEntity()
        {
            IDataProvider dataProvider = new InMemoryDataProvider <AppContext>();

            ItemCategory category = new ItemCategory
            {
                Name = "testCategory"
            };

            var persistedCategory = dataProvider.CreateEntity(category);

            dataProvider.SaveChanges();

            var foundEntity = dataProvider.Find <ItemCategory>(persistedCategory.Id);

            Assert.AreEqual(persistedCategory.Id, foundEntity.Id);
        }