예제 #1
0
        public void GetAll()
        {
            foreach (var m in Modl <CustomIdStringClass> .GetAll())
            {
                m.Delete();
            }

            var modlList = Modl <CustomIdStringClass> .GetAll().ToList();

            Assert.Equal(0, modlList.Count);

            var modl  = new CustomIdStringClass().Id(Guid.NewGuid().ToString()).Save();
            var modl2 = new CustomIdStringClass().Id(Guid.NewGuid().ToString()).Save();

            modlList = Modl <CustomIdStringClass> .GetAll().ToList();

            Assert.Equal(2, modlList.Count);
            Assert.True(modlList.Any(x => x.Id() == modl.Id()));
            Assert.True(modlList.Any(x => x.Id() == modl2.Id()));
        }
예제 #2
0
        public void GetAll()
        {
            foreach (var m in Modl <EmptyClass> .GetAll())
            {
                m.Delete();
            }

            var modlList = Modl <EmptyClass> .GetAll().ToList();

            Assert.Equal(0, modlList.Count);

            var modl  = new EmptyClass().Save();
            var modl2 = new EmptyClass().Save();

            modlList = Modl <EmptyClass> .GetAll().ToList();

            Assert.Equal(2, modlList.Count);
            Assert.True(modlList.Any(x => x.Id() == modl.Id()));
            Assert.True(modlList.Any(x => x.Id() == modl2.Id()));
        }