Example #1
0
        [TestMethod()]//Check if the CompanySaveResultType Is Returned.
        public void CreateCompanyTestToCheckIfCorrectResultTypeIsReturned()
        {
            //Act
            var actualResult = AccountServiceHelper.CreateCompany(createCompany, accountInfo, createCompanyController);

            //Assert
            Assert.IsInstanceOfType(actualResult, typeof(CompanySaveResult), "Incorrect result type returned!!");
        }
Example #2
0
        [TestMethod()]//Check if the Correct CompanyID and TransactionID Is Returned.
        public void CreateCompanyTestToCheckIfCompanyID_And_TransactionIDIsReturned()
        {
            //Act
            var actualResult = AccountServiceHelper.CreateCompany(createCompany, accountInfo, createCompanyController);

            //Assert
            Assert.IsNotNull(actualResult.CompanyId, "Null CompanyID returned!!");
            Assert.IsNotNull(actualResult.TransactionId, "Null TransactionID returned!!");
        }
Example #3
0
        [TestMethod()]//Check if the Correct ResultCode Is Returned.
        public void CreateCompanyTestToCheckIfResultCodeIsReturned()
        {
            //Arrange
            var Success = SeverityLevel.Success;

            //Act
            var actualResult = AccountServiceHelper.CreateCompany(createCompany, accountInfo, createCompanyController);

            //Assert
            Assert.AreEqual(Success, actualResult.ResultCode, "ResultCode must be Success");
        }
Example #4
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!!");
        }
Example #5
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!!");
        }