public void GetDemographic_Failed()
        {
            // Arrange
            var controller = new RegistrationController(new RegistrationRepository(token));

            // Act
            var result        = controller.GetContactDemographics(0);
            var modelResponse = result.Result;
            var count         = modelResponse.DataItems.Count;

            // Assert
            Assert.IsTrue(count == 0);
        }
        public void GetContactDemographic_Failed()
        {
            Mock_ContactDemographics_Failed();
            // Arrange
            RegistrationController contactDemographicController = new RegistrationController(registrationDataProvider);

            //Act
            var getContactDemographicResult = contactDemographicController.GetContactDemographics(0);
            var response          = getContactDemographicResult as HttpResult <Response <ContactDemographicsModel> >;
            var contactDemography = response.Value.DataItems;

            //Assert
            Assert.IsNull(response.Value.DataItems[0].FirstName);
            Assert.IsNull(response.Value.DataItems[0].LastName);
        }
        public void GetContactDemographic_Success()
        {
            Mock_ContactDemographics_Success();
            // Arrange
            RegistrationController contactDemographicController = new RegistrationController(registrationDataProvider);

            //Act
            var getContactDemographicResult = contactDemographicController.GetContactDemographics(contactId);
            var response          = getContactDemographicResult as HttpResult <Response <ContactDemographicsModel> >;
            var contactDemography = response.Value.DataItems;
            var count             = contactDemography.Count();

            //Assert
            Assert.IsNotNull(contactDemography, "Data items can't be null");
            Assert.IsTrue(contactDemography.Count() > 0, "Atleast one Contact demography must exists.");
        }
        public void GetContactDemographic_Failed()
        {
            //Arrenge
            ContactDemographics_Failed();

            RegistrationController contactDemographicController = new RegistrationController(registrationRuleEngine);


            //Act
            var getContactDemographicResult = contactDemographicController.GetContactDemographics(0);
            var response          = getContactDemographicResult as HttpResult <Response <ContactDemographicsModel> >;
            var contactDemography = response.Value.DataItems;
            var count             = contactDemography.Count();

            //Arrenge
            Assert.IsNull(response.Value.DataItems[0].FirstName);
            Assert.IsNull(response.Value.DataItems[0].LastName);
        }