Пример #1
0
 //[TestMethod]
 public void DeleteCompany()
 {
     ICompanyManager cManager = DaoFactory.GetCompanyManager();
     Company _company = new Company();
     _company.Id = 1;
     cManager.DeleteCompanyById(_company);
 }
Пример #2
0
 //[TestMethod]
 public void SaveCompany()
 {
     ICompanyManager cManager = DaoFactory.GetCompanyManager();
     Company _company = new Company();
     _company.CompanyName = "Bhim and kalu company";
     _company.ContactPerson = "Bhim kunwar";
     _company.Email = "*****@*****.**";
     _company.IsActive = true;
     _company.JoinedDate = DateTime.Now;
     _company.ValidTillDate = DateTime.Now;
     cManager.SaveCompany(_company);
 }
Пример #3
0
        //[TestMethod]
        public void SaveUserTest()
        {
            bool isCreated = false;
            IUserManager uManager = DaoFactory.GetUserManager();
            User user = new User();
            var company = new Company();
            company.Id = 1;

            user.UserName = "******";
            user.Designation = "ceo";
            user.IsActive = true;
            user.Name = "bhim";
            user.OldPassword = "******";
            user.UserType = "admin";
            user.company = company;
            isCreated = uManager.IsUserCreated(user);
            Assert.IsTrue(isCreated);
        }
Пример #4
0
 public void Save(Company entity)
 {
     ICompanyManager companyManager = DaoFactory.GetCompanyManager();
     companyManager.SaveCompany(entity);
 }