public CreateTestsFixture()
        {
            AutoFixture = new Fixture();
            Mediator    = new Mock <IMediator>();
            Controller  = new CohortController(Mediator.Object);
            Request     = AutoFixture.Create <CreateCohortRequest>();
            Result      = AutoFixture.Create <AddCohortResult>();

            Mediator
            .Setup(m => m.Send(It.Is <AddCohortCommand>(c =>
                                                        c.AccountId == Request.AccountId &&
                                                        c.AccountLegalEntityId == Request.AccountLegalEntityId &&
                                                        c.ProviderId == Request.ProviderId &&
                                                        c.CourseCode == Request.CourseCode &&
                                                        c.Cost == Request.Cost &&
                                                        c.StartDate == Request.StartDate &&
                                                        c.EndDate == Request.EndDate &&
                                                        c.OriginatorReference == Request.OriginatorReference &&
                                                        c.ReservationId == Request.ReservationId &&
                                                        c.FirstName == Request.FirstName &&
                                                        c.LastName == Request.LastName &&
                                                        c.DateOfBirth == Request.DateOfBirth &&
                                                        c.Uln == Request.Uln &&
                                                        c.TransferSenderId == Request.TransferSenderId &&
                                                        c.UserInfo == Request.UserInfo), CancellationToken.None))
            .ReturnsAsync(Result);
        }
示例#2
0
        public CreateEmptyCohortTestsFixture()
        {
            AutoFixture = new Fixture();
            Mediator    = new Mock <IMediator>();
            Controller  = new CohortController(Mediator.Object);
            Request     = AutoFixture.Create <CreateEmptyCohortRequest>();
            Result      = AutoFixture.Create <AddCohortResult>();

            Mediator
            .Setup(m => m.Send(It.Is <AddEmptyCohortCommand>(c =>
                                                             c.AccountId == Request.AccountId &&
                                                             c.AccountLegalEntityId == Request.AccountLegalEntityId &&
                                                             c.ProviderId == Request.ProviderId &&
                                                             c.UserInfo == Request.UserInfo), CancellationToken.None))
            .ReturnsAsync(Result);
        }