public void GivenSuccess_ThenSuccessStatusIsReturned()
        {
            //Arrange
            string firstname          = "First",
                   lastname           = "Last",
                   companyname        = "companyName",
                   email              = "*****@*****.**",
                   employeeCount      = "100",
                   enquiryDescription = "test query",
                   enquirySource      = "Telephone Call",
                   title              = "Mr",
                   prevExp            = "Yes",
                   position           = "Position",
                   workSector         = "retail",
                   phoneNumber        = "0987654321",
                   mobile             = "1234567890",
                   address1           = "Line1",
                   city                 = "City",
                   postcode             = "Postcode";
            var addressViewModelBuilder =
                new AddressViewModelBuilder().AddressLine1(address1).City(city).Postcode(postcode).Build();

            var viewModel = new EmployerEnquiryViewModelBuilder().Firstname(firstname).Lastname(lastname).MobileNumber(mobile)
                            .PhoneNumber(phoneNumber).Position(position).PrevExp(prevExp).Title(title)
                            .WorkSector(workSector)
                            .EnquirySource(enquirySource).EnquiryDescription(enquiryDescription).EmployeeCount(employeeCount)
                            .Email(email).Companyname(companyname)
                            .Address(addressViewModelBuilder)
                            .Build();

            Mock <ICommunciationService> serviceMock = new Mock <ICommunciationService>();

            serviceMock.Setup(cs => cs.SendMessage(It.IsAny <MessageTypes>(), It.IsAny <IEnumerable <CommunicationToken> >()));

            Mock <IViewModelToDomainMapper <EmployerEnquiryViewModel, EmployerEnquiry> > employerEnquiryVtoDMapper = new Mock <IViewModelToDomainMapper <EmployerEnquiryViewModel, EmployerEnquiry> >();

            employerEnquiryVtoDMapper.Setup(cs => cs.ConvertToDomain(It.IsAny <EmployerEnquiryViewModel>()))
            .Returns(new EmployerEnquiry()
            {
                Address = new Address()
            });

            var provider = new EmployerEnquiryProviderBuilder().With(serviceMock).With(employerEnquiryVtoDMapper).Build();

            //Act
            var result = provider.SubmitGlaEnquiry(viewModel);

            //Assert
            result.Should().Be(SubmitQueryStatus.Success);
        }
        public void GivenError_ThenErrorStatusIsReturned()
        {
            //Arrange
            var viewModel = new EmployerEnquiryViewModelBuilder().Build();

            Mock <ICommunciationService> serviceMock = new Mock <ICommunciationService>();

            serviceMock.Setup(cs => cs.SendMessage(It.IsAny <MessageTypes>(), It.IsAny <IEnumerable <CommunicationToken> >())).Throws(new Exception());
            var provider = new EmployerEnquiryProviderBuilder().With(serviceMock).Build();

            //Act
            var result = provider.SubmitGlaEnquiry(viewModel);

            //Assert
            result.Should().Be(SubmitQueryStatus.Error);
        }