Example #1
0
        public void ConsultantNonCompetent()
        {
            Planification  planification = new Planification();
            MockingFactory mockFactory   = new MockingFactory();
            IProspection   prospection   = Mock.Of <IProspection>();

            Mock.Get(prospection).Setup(p => p.GetCandidats()).Returns(mockFactory.Candidats);

            IBaseSalariale baseSalariale = Mock.Of <IBaseSalariale>();

            Mock.Get(baseSalariale).Setup(b => b.GetConsultantRecruteurs()).Returns(mockFactory.ConsultantRecruteurs);


            Candidat candidat = prospection.GetCandidats().First(c => c.Profil.Competences.Where(p => p.Key.Nom == "php").First());

            planification.BaseSalariale = baseSalariale;
            Entretien entretien = planification.PlanifierEntretien(candidat, new DateTime(2019, 02, 24, 08, 00, 00), 60);

            Assert.Null(entretien);
        }
Example #2
0
        public void NormalProcess()
        {
            Planification  planification = new Planification();
            MockingFactory mockFactory   = new MockingFactory();
            IProspection   prospection   = Mock.Of <IProspection>();

            Mock.Get(prospection).Setup(p => p.GetCandidats()).Returns(mockFactory.Candidats);

            IBaseSalariale baseSalariale = Mock.Of <IBaseSalariale>();

            Mock.Get(baseSalariale).Setup(b => b.GetConsultantRecruteurs()).Returns(mockFactory.ConsultantRecruteurs);


            Candidat candidat = prospection.GetCandidats().FirstOrDefault();

            planification.BaseSalariale = baseSalariale;
            Entretien entretien = planification.PlanifierEntretien(candidat, new DateTime(2019, 02, 24, 08, 00, 00), 60);

            Assert.Equal("Planifié", entretien.Statut);
        }
Example #3
0
        public void ConsultantNonDisponible()
        {
            Planification  planification = new Planification();
            MockingFactory mockFactory   = new MockingFactory();
            IProspection   prospection   = Mock.Of <IProspection>();

            Mock.Get(prospection).Setup(p => p.GetCandidats()).Returns(mockFactory.Candidats);

            IBaseSalariale baseSalariale = Mock.Of <IBaseSalariale>();

            Mock.Get(baseSalariale).Setup(b => b.GetConsultantRecruteurs()).Returns(mockFactory.ConsultantRecruteurs);


            Candidat candidat = prospection.GetCandidats().FirstOrDefault();

            planification.BaseSalariale = baseSalariale;
            Entretien entretien = planification.PlanifierEntretien(candidat, new DateTime(2019, 02, 22, 13, 30, 00), 60);

            Assert.Null(entretien);
        }
Example #4
0
        public void Initialize()
        {
            factory = new MockingFactory();

            mockBillService = new Mock <IBillService>();
            mockBillService.Setup(m => m.GetAllBills()).Returns(factory.CreateBillList());
            mockBillService.Setup(m => m.GetBill(1)).Returns(factory.CreateBill());
            mockBillService.Setup(m => m.GetBillTypes()).Returns(factory.CreateBillTypesList());
            mockBillService.Setup(m => m.MarkBillAsPaid(1));

            mockRecipientService = new Mock <IRecipientService>();
            mockRecipientService.Setup(m => m.GetActiveRecipients()).Returns(factory.CreateRecipients());

            mockBillFactory = new Mock <IBillFactory>();
            mockBillFactory.Setup(m => m.NewBill(It.IsAny <int>(), It.IsAny <int>(),
                                                 It.IsAny <int>(), It.IsAny <string>(),
                                                 It.IsAny <decimal>(), It.IsAny <DateTime>(),
                                                 It.IsAny <bool>(), It.IsAny <int>(), It.IsAny <bool>()
                                                 )).Returns(factory.CreateBill());
        }