Esempio n. 1
0
        public void ThenCollectorIsSavedCorrectly()
        {
            Collector expectedObject = ContextExpectedCollector;
            Collector actualObject   = GetCollectorDataById("last");

            Assert.AreEqual(expectedObject, actualObject, PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }
Esempio n. 2
0
 public void ThenStudentIsModifiedCorrectly(string id)
 {
     Student expectedObject = ScenarioContext.Get<Student>("expectedModifiedStudent");
     Student actualObject = GetStudentDataById(id);
     Assert.AreEqual(expectedObject, actualObject, 
         PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
 }
Esempio n. 3
0
 public void ThenStudentIsSavedCorrectly()
 {
     Student expectedObject = ContextExpectedStudent;
     Student actualObject = GetStudentDataById("last");
     Assert.AreEqual(expectedObject, actualObject,
         PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
 }
Esempio n. 4
0
        public void ThenAppointmentDataIsSavedCorrectly()
        {
            Appointment actualObject   = GetAppointmentDataById("last");
            Appointment expectedObject = ContextExpectedAppointment;

            Assert.AreEqual(expectedObject, actualObject,
                            PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }
Esempio n. 5
0
        public void ThenDebtIsSavedCorrectly()
        {
            Debt expectedObject = ContextExpectedDebt;
            Debt actualObject   = GetDebtDataById("last");

            Assert.AreEqual(expectedObject, actualObject,
                            PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }
Esempio n. 6
0
        public void ThenCollectorIsModifiedCorrectly(string id)
        {
            Collector expectedObject = ScenarioContext.Get <Collector>("expectedModifiedCollector");
            Collector actualObject   = GetCollectorDataById(id);

            Assert.AreEqual(expectedObject, actualObject,
                            PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }
Esempio n. 7
0
        public void ThenDebtWithIdIsConnectedWithFollowingObject(string id, SdcaParts sdcaPart, Table table)
        {
            int    neededId       = GetNeededId(id, SdcaParts.debt);
            object expectedObject = sdcaPart switch
            {
                SdcaParts.student => Transformations.GetStudentBasedOnStudentCreator(StepArgumentTransformations.GetStudentCreator(table)),
                _ => null
            };
            object actualObject = sdcaPart switch
            {
                SdcaParts.student => new StudentSteps().GetStudentById(new DebtSteps().GetDebtById(neededId).studentId),
                _ => null
            };

            Assert.AreEqual(expectedObject, actualObject,
                            PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }
Esempio n. 8
0
        public void ThenAppointmentDataWithIdIsConnectedWithFollowingObject(string id, SdcaParts sdcaPart, Table table)
        {
            int    neededId       = GetNeededId(id, SdcaParts.appointment);
            object expectedObject = sdcaPart switch
            {
                SdcaParts.debt => Transformations.GetDebtBasedOnDebtCreator(StepArgumentTransformations.GetDebtCreator(table)),
                SdcaParts.collector => Transformations.GetCollectorBasedOnCollectorCreator(StepArgumentTransformations.GetCollectorCreator(table)),
                _ => null
            };
            Appointment appointment  = new AppointmentSteps().GetAppointmentById(neededId);
            object      actualObject = sdcaPart switch
            {
                SdcaParts.debt => new DebtSteps().GetDebtById(appointment.debtId),
                SdcaParts.collector => new CollectorSteps().GetCollectorById(appointment.collectorIds[0]),
                _ => null
            };

            Assert.AreEqual(expectedObject, actualObject,
                            PropertiesDescriber.GetActualAndExpectedObjectsProperties(expectedObject, actualObject));
        }