示例#1
0
        public void List()
        {
            var modl  = new CustomIdStringClass().Id(Guid.NewGuid().ToString()).Save();
            var modl2 = new CustomIdStringClass().Id(Guid.NewGuid().ToString()).Save();

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

            Assert.NotEqual(0, modlList.Count);
            Assert.True(modlList.Any(x => x as string == modl.Id().Get <string>()));
            Assert.True(modlList.Any(x => x as string == modl2.Id().Get <string>()));

            var modlList2 = Modl <CustomIdStringClass> .List <string>().ToList();

            Assert.NotEqual(0, modlList2.Count);
            Assert.True(modlList2.Any(x => x == modl.Id().Get <string>()));
            Assert.True(modlList2.Any(x => x == modl2.Id().Get <string>()));
        }
示例#2
0
        public void List()
        {
            var modl  = new EmptyClass().Save();
            var modl2 = new EmptyClass().Save();

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

            Assert.NotEqual(0, modlList.Count);
            Assert.True(modlList.Any(x => x == modl.Id()));
            Assert.True(modlList.Any(x => x == modl2.Id()));

            var modlList2 = Modl <EmptyClass> .List <Guid>().ToList();

            Assert.NotEqual(0, modlList2.Count);
            Assert.True(modlList2.Any(x => x == modl.Id()));
            Assert.True(modlList2.Any(x => x == modl2.Id()));
        }