コード例 #1
0
        public void CanGetAllObject()
        {
            //CmsPageSecurityZoneUserRole role = new CmsPageSecurityZoneUserRole();
            PageSecurityZoneUserRoleRepository  repository = new PageSecurityZoneUserRoleRepository();
            IList <CmsPageSecurityZoneUserRole> rolelist   = repository.GetAll();

            Assert.That(rolelist.Count, Is.EqualTo(4));
        }
コード例 #2
0
        public void CanQueryByZoneID()
        {
            PageSecurityZoneUserRoleRepository repository  = new PageSecurityZoneUserRoleRepository();
            CmsPageSecurityZoneUserRoleDb      dboperation = new CmsPageSecurityZoneUserRoleDb();
            CmsPageSecurityZone z = new CmsPageSecurityZone(2);
            //z.Id = 2;
            List <CmsPageSecurityZoneUserRole> resultlist = dboperation.fetchAllByZone(z);

            Assert.That(resultlist.Count, Is.EqualTo(2));
        }
コード例 #3
0
        public void CanInsertObject()
        {
            PageSecurityZoneUserRoleRepository repository    = new PageSecurityZoneUserRoleRepository();
            CmsPageSecurityZoneUserRoleDb      dboperation   = new CmsPageSecurityZoneUserRoleDb();
            CmsPageSecurityZoneUserRole        insertobject  = new CmsPageSecurityZoneUserRole(1, 2, true, false);
            CmsPageSecurityZoneUserRole        insertobject2 = new CmsPageSecurityZoneUserRole(2, 2, false, false);
            List <CmsPageSecurityZoneUserRole> objectlist    = new List <CmsPageSecurityZoneUserRole>();

            objectlist.Add(insertobject);
            objectlist.Add(insertobject2);
            if (dboperation.insert(objectlist) == false)
            {
                throw new Exception("insert test fail");
            }
            //CmsPageSecurityZoneUserRole returnobject = repository.SaveOrUpdate(insertobject);
            //Assert.That(repository, Is.Not.Null);
        }
コード例 #4
0
 public CmsPageSecurityZoneUserRoleDb()
 {
     repository = new PageSecurityZoneUserRoleRepository();
 }