public override void TestInitialize() { base.TestInitialize(); trainings = new TestRepository(); entries = new TestTimetableEntriesRepository(); types = new TestTrainingTypesRepository(); coaches = new TestCoachesRepository(); categories = new TestTrainingCategoriesRepository(); locations = new TestLocationsRepository(); trainingData = GetRandom.Object <TrainingData>(); var t = new Training(trainingData); trainings.Add(t).GetAwaiter(); typeData = GetRandom.Object <TrainingTypeData>(); var tt = new TrainingType(typeData); types.Add(tt).GetAwaiter(); locationData = GetRandom.Object <LocationData>(); var l = new Location(locationData); locations.Add(l).GetAwaiter(); coachData = GetRandom.Object <CoachData>(); var c = new Coach(coachData); coaches.Add(c).GetAwaiter(); categoryData = GetRandom.Object <TrainingCategoryData>(); var tc = new TrainingCategory(categoryData); categories.Add(tc).GetAwaiter(); obj = new TestClass(trainings, entries, categories, coaches, types, locations); }
public override void TestInitialize() { base.TestInitialize(); entries = new TestRepository(); trainings = new TestTrainingsRepository(); locations = new TestLocationsRepository(); coaches = new TestCoachesRepository(); types = new TestTrainingTypesRepository(); participants = new TestParticipantsRepository(); clients = new TestClientsRepository(); data = GetRandom.Object <TimetableEntryData>(); var e = new TimetableEntry(data); entries.Add(e).GetAwaiter(); clientData = GetRandom.Object <ClientData>(); var c = new Client(clientData); clients.Add(c).GetAwaiter(); coachData = GetRandom.Object <CoachData>(); var co = new Coach(coachData); coaches.Add(co).GetAwaiter(); trainingData = GetRandom.Object <TrainingData>(); var t = new Training(trainingData); trainings.Add(t).GetAwaiter(); trainingTypeData = GetRandom.Object <TrainingTypeData>(); var tt = new TrainingType(trainingTypeData); types.Add(tt).GetAwaiter(); locationData = GetRandom.Object <LocationData>(); var l = new Location(locationData); locations.Add(l).GetAwaiter(); obj = new TestClass(clients, entries, trainings, locations, types, coaches, participants); }