Пример #1
0
        public void GetAllItemsByUser()
        {
            var repository = new DemoRepository();

            var items = repository.GetAllByUser(17);

            Assert.IsTrue(items.Count > 0);
        }
Пример #2
0
        public void GetAllItemsByCreated()
        {
            var repository = new DemoRepository();

            var items = repository.GetAllByCreated(DateTime.Today);

            Assert.IsTrue(items.Count > 0);
        }
Пример #3
0
        public void GetAllItemsByAuthor_DisplayName()
        {
            var repository = new DemoRepository();

            var items = repository.GetAllByAuthor("Raul Fuentes");

            Assert.IsTrue(items.Count > 0);
        }
Пример #4
0
        public void InsertItem()
        {
            var repository = new DemoRepository();

            var item = new Item();

            item.Title = "Item " + DateTime.Now.Ticks;

            item = repository.Insert(item);

            Assert.IsTrue(item.ID > 0);
        }
Пример #5
0
        public void UpdateItem()
        {
            var repository = new DemoRepository();

            var item = new Item();

            item.ID = 3;

            item.Title = "Item Updated " + DateTime.Now.Ticks;

            item = repository.Update(item);

            Assert.IsTrue(item.Title.IndexOf("Updated") > -1);
        }