Пример #1
0
        public override void TestInitialize()
        {
            base.TestInitialize();
            _appointments = new AppointmentsRepository();
            _clients      = new ClientsRepository();
            _treatments   = new TreatmentsRepository();
            _technicians  = new TechniciansRepository();
            _clientData   = GetRandom.Object <ClientData>();
            var c = new global::Delux.Domain.Client.Client(_clientData);

            _clients.Add(c).GetAwaiter();
            AddRandomClients();
            _treatmentData = GetRandom.Object <TreatmentData>();
            var tr = new global::Delux.Domain.Treatment.Treatment(_treatmentData);

            _treatments.Add(tr).GetAwaiter();
            AddRandomTreatments();
            _technicianData = GetRandom.Object <TechnicianData>();
            var te = new global::Delux.Domain.Technician.Technician(_technicianData);

            _technicians.Add(te).GetAwaiter();
            AddRandomTechnicians();

            Obj = new TestClass(_appointments, _clients, _treatments, _technicians);
        }
Пример #2
0
 private void AddRandomTreatments()
 {
     for (var i = 0; i < GetRandom.UInt8(3, 10); i++)
     {
         var d  = GetRandom.Object <TreatmentData>();
         var tr = new global::Delux.Domain.Treatment.Treatment(d);
         _treatments.Add(tr).GetAwaiter();
     }
 }