コード例 #1
0
        public void CreateApplication_CompanyIsNull()
        {
            var repo = new ApplicationRepo(null);
            var app  = new Application()
            {
                CompanyId = null
            };

            var result = repo.CreateApplication(app);

            Assert.Null(result);
        }
コード例 #2
0
        public void EditApplication_CompanyIsNull()
        {
            var id   = 1;
            var repo = new ApplicationRepo(null);
            var app  = new Application()
            {
                Id = id, CompanyId = null
            };

            var result = repo.EditApplication(id, app);

            Assert.False(result);
        }
        void ReleaseDesignerOutlets()
        {
            if (ApplicationRepo != null)
            {
                ApplicationRepo.Dispose();
                ApplicationRepo = null;
            }

            if (ModelRepo != null)
            {
                ModelRepo.Dispose();
                ModelRepo = null;
            }
        }
コード例 #4
0
        public void EditApplication_IdsNotMatching()
        {
            int id = 1, id2 = 2;
            int companyId = 1;
            var repo      = new ApplicationRepo(null);
            var app       = new Application()
            {
                Id = id, CompanyId = companyId
            };

            var result = repo.EditApplication(id2, app);

            Assert.False(result);
        }
コード例 #5
0
 public ActionResult Create()
 {
     ViewBag.EducationList = new SelectList(ApplicationRepo.EducationList(), "last_education");
     return(View("Index", new ApplicationViewModel()));
 }
コード例 #6
0
 public tenant_applications(Login l)
 {
     InitializeComponent();
     this.l  = l;
     this.ar = new ApplicationRepo();
 }