Esempio n. 1
0
        [TestMethod()]//check if resultset is not null.
        public void CreateNexusTestToCheckIfNullResultsetIsNotReturned()
        {
            //Arrange
            var    companyResult = AccountServiceHelper.CreateCompany(createCompany, accountInfo, createCompanyController);
            int    companyID     = companyResult.CompanyId;
            string country       = "IN";
            string state         = "MH";

            nexusController = new NexusSetupController();
            nexusController.TempData.Add("AccountInfo", accountInfo);
            nexusController.TempData.Add("AccountService", accountService);

            //Act

            var actualResult = AccountServiceHelper.CreateNexus(country, state, companyID, nexusController);

            //Assert
            Assert.IsNotNull(actualResult, "resultset must not be null!!");
        }
Esempio n. 2
0
        [TestMethod()]//check if resultcode is success when unique nexus is created
        public void CreateNexusTestToCheckIfResultCodeIsSuccessForUniqueNexus()
        {
            //Arrange
            var    companyResult = AccountServiceHelper.CreateCompany(createCompany, accountInfo, createCompanyController);
            int    companyID     = companyResult.CompanyId;
            string country       = "IN";
            string state         = "RJ";

            nexusController = new NexusSetupController();
            nexusController.TempData.Add("AccountInfo", accountInfo);
            nexusController.TempData.Add("AccountService", accountService);

            var Success = SeverityLevel.Success;

            //Act

            var actualResult = AccountServiceHelper.CreateNexus(country, state, companyID, nexusController);

            //Assert
            Assert.AreEqual(Success, actualResult[0].ResultCode, "resultcode must be success!!");
        }