Example #1
0
        public void List_Should_Return_All_Entities()
        {
            // arrange
            var jsonRepository = new JsonRepository(TestContext.TestDir);
            jsonRepository.DeleteAll<Entry>();
            jsonRepository.Save(new Entry { Title = "Entry 1" });
            jsonRepository.Save(new Entry { Title = "Entry 2" });
            jsonRepository.Save(new Entry { Title = "Entry 3" });

            // act
            var all = jsonRepository.All<Entry>();

            // assert
            Assert.IsTrue(all.Count() == 3);
        }