public CertificateValidatorMockBase()
        {
            Certificate = SetupCertificate();

            MockLogger = new Mock <ILogger <CertificateController> >();
            var mockedApiClientLogger    = new Mock <ILogger <CertificateApiClient> >();
            var mockedOrgApiClientLogger = new Mock <ILogger <OrganisationsApiClient> >();

            MockSession = new Mock <ISessionService>();

            MockHttpContextAccessor  = MockedHttpContextAccessor.Setup();
            MockCertificateApiClient = MockedCertificateApiClient.Setup(Certificate, mockedApiClientLogger);

            MockAssessmentOrgsApiClient = MockedOrganisationsApiClient.Setup(mockedOrgApiClientLogger);

            CertificateData = JsonConvert.DeserializeObject <CertificateData>(Certificate.CertificateData);
        }
        public CertificatePostBase()
        {
            Certificate = SetupCertificate();

            MockLogger = new Mock <ILogger <CertificateController> >();
            var mockedApiClientLogger    = new Mock <ILogger <CertificateApiClient> >();
            var mockedOrgApiClientLogger = new Mock <ILogger <OrganisationsApiClient> >();

            MockSession = new Mock <ISessionService>();
            MockStandardServiceClient = new Mock <IStandardServiceClient>();

            var standards = new List <StandardCollation>
            {
                new StandardCollation
                {
                    StandardId   = 91,
                    StandardData = new StandardData {
                        Level = 2
                    },
                    Title = "Test Title 1"
                },
                new StandardCollation
                {
                    StandardId   = 92,
                    StandardData = new StandardData {
                        Level = 3
                    },
                    Title = "Test Title 2"
                },
                new StandardCollation
                {
                    StandardId   = 93,
                    StandardData = new StandardData {
                        Level = 5
                    },
                    Title = "Test Title 3"
                },
                new StandardCollation
                {
                    StandardId   = 94,
                    StandardData = new StandardData {
                        Level = 2
                    },
                    Title = "Test Title 4"
                },
                new StandardCollation
                {
                    StandardId   = 95,
                    StandardData = new StandardData {
                        Level = 2
                    },
                    Title = "Test Title 5"
                },
            };

            MockStandardServiceClient.Setup(s => s.GetAllStandards()).Returns(Task.FromResult(standards.AsEnumerable()));

            MockHttpContextAccessor  = MockedHttpContextAccessor.Setup();
            MockCertificateApiClient = MockedCertificateApiClient.Setup(Certificate, mockedApiClientLogger);

            MockOrganisationApiClient = MockedOrganisationsApiClient.Setup(mockedOrgApiClientLogger);

            CertificateData = JsonConvert.DeserializeObject <CertificateData>(Certificate.CertificateData);
        }
 private ICertificateApiClient SetUpCertificateApiClient()
 {
     return(MockedCertificateApiClient.Setup(Certificate, new Mock <ILogger <CertificateApiClient> >()));
 }