private Licensee CreateLicensee(LicenseeStatus status) { var randomString = TestDataGenerator.GetRandomString(); var licensee = new Licensee { Id = Guid.NewGuid(), Name = "Name" + randomString, AffiliateSystem = false, CompanyName = "CName" + randomString, ContractStart = DateTimeOffset.UtcNow.AddDays(-7), Email = TestDataGenerator.GetRandomEmail(), AllowedBrandCount = 10, AllowedWebsiteCount = 10, TimezoneId = TestDataGenerator.GetRandomTimeZone().Id, Status = status, }; licensee.Contracts.Add(new Contract { Id = Guid.NewGuid(), LicenseeId = licensee.Id, Licensee = licensee, StartDate = licensee.ContractStart, EndDate = licensee.ContractEnd, IsCurrentContract = true }); _fakeBrandRepository.Licensees.Add(licensee); _fakeBrandRepository.SaveChanges(); return(licensee); }
private IList <Licensee> CreateLicensees(int count = 1, LicenseeStatus status = LicenseeStatus.Active) { var result = new List <Licensee>(); for (var i = 0; i < count; i++) { var licensee = BrandHelper.CreateLicensee(); licensee.Status = status; result.Add(licensee); } return(result); }