public WhenCohortIsSetFixture() { var autoFixture = new Fixture(); UnitOfWorkContext = new UnitOfWorkContext(); _cohort = new CommitmentsV2.Models.Cohort(); _cohort.SetValue(x => x.Id, autoFixture.Create <long>()); _cohort.SetValue(x => x.ProviderId, autoFixture.Create <long>()); _cohort.SetValue(x => x.EmployerAccountId, autoFixture.Create <long>()); _changeOfPartyRequest = autoFixture.Create <CommitmentsV2.Models.ChangeOfPartyRequest>(); }
public WhenCohortIsCreatedTestFixture() { UnitOfWorkContext = new UnitOfWorkContext(); ReservationId = _autoFixture.Create <Guid>(); UserInfo = _autoFixture.Create <UserInfo>(); var cohort = new CommitmentsV2.Models.Cohort(); cohort.SetValue(x => x.ProviderId, _autoFixture.Create <long>()); ContinuedApprenticeship = new CommitmentsV2.Models.Apprenticeship(); ContinuedApprenticeship.SetValue(x => x.Id, _autoFixture.Create <long>()); ContinuedApprenticeship.SetValue(x => x.Cohort, cohort); ContinuedApprenticeship.SetValue(x => x.CommitmentId, cohort.Id); ContinuedApprenticeship.SetValue(x => x.FirstName, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.LastName, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.DateOfBirth, _autoFixture.Create <DateTime>()); ContinuedApprenticeship.SetValue(x => x.Uln, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.StartDate, _autoFixture.Create <DateTime?>()); ContinuedApprenticeship.SetValue(x => x.EndDate, _autoFixture.Create <DateTime?>()); ContinuedApprenticeship.SetValue(x => x.StartDate, _autoFixture.Create <DateTime?>()); ContinuedApprenticeship.SetValue(x => x.CourseCode, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.CourseName, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.ProgrammeType, _autoFixture.Create <ProgrammeType>()); ContinuedApprenticeship.SetValue(x => x.EmployerRef, _autoFixture.Create <string>()); ContinuedApprenticeship.SetValue(x => x.ProviderRef, _autoFixture.Create <string>()); Request = new CommitmentsV2.Models.ChangeOfPartyRequest(); Request.SetValue(x => x.Apprenticeship, ContinuedApprenticeship); Request.SetValue(x => x.ApprenticeshipId, ContinuedApprenticeship.Id); Request.SetValue(x => x.StartDate, _autoFixture.Create <DateTime?>()); Request.SetValue(x => x.Price, _autoFixture.Create <int?>()); Request.SetValue(x => x.OriginatingParty, _autoFixture.Create <Party>()); }