Ejemplo n.º 1
0
        public virtual IExerciceChoice ChooseAndShow(EExercice exercice)
        {
            IExerciceChoice choice = null;

            switch (exercice)
            {
            case EExercice.Exercice_1:
                choice = new Exercice_1();
                break;

            case EExercice.Exercice_2:
                choice = new Exercice_2();
                break;

            case EExercice.Exercice_3:
                choice = new Exercice_3();
                break;

            case EExercice.Exercice_4:
                choice = new Exercice_4();
                break;

            case EExercice.Exercice_5:
                choice = new Exercice_5();
                break;

            case EExercice.Quit:
            default: break;
            }

            return(choice);
        }
Ejemplo n.º 2
0
        public void run_third_exercice_should_update_one_address()
        {
            int oldNumberOfAddresses = _testRepostory.GetNumberOfAddresses();

            Exercice_3 thirdExercise            = new Exercice_3();
            var        numberOfUpdatedAddresses = thirdExercise.RunExercice();

            int newNumberOfAddresses = _testRepostory.GetNumberOfAddresses();

            Assert.AreEqual(oldNumberOfAddresses, newNumberOfAddresses);
            Assert.AreEqual(1, numberOfUpdatedAddresses);
        }