Beispiel #1
0
        public MotivatieControllerTest()
        {
            var locatie = new Locatie("a", 2, "Bel", 9000, "Gent");

            _organisaties = new List <Organisatie>()
            {
                new Organisatie("organisatie1", "*****@*****.**", locatie, "test")
                {
                    Contactpersonen = new List <Contactpersoon>()
                    {
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                    }
                },
                new Organisatie("organisatie2", "*****@*****.**", locatie, "test")
                {
                    Contactpersonen = new List <Contactpersoon>()
                    {
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                    }
                },
                new Organisatie("organisatie3", "*****@*****.**", locatie, "test")
                {
                    Contactpersonen = new List <Contactpersoon>()
                    {
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                        new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                    }
                }
            };
            _organisatie = new Organisatie("organisatie4", "*****@*****.**", locatie, "test")
            {
                Contactpersonen = new List <Contactpersoon>()
                {
                    new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                    new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                    new Contactpersoon(It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>(), It.IsAny <String>()),
                }
            };
            var lector = new Lector("Sebastiaan", "Labijn", "*****@*****.**");

            _school                   = new School("hogeschool", "*****@*****.**", locatie);
            _groepRepository          = new Mock <IGroepRepository>();
            _cursistRepository        = new Mock <ICursistRepository>();
            _schoolRepository         = new Mock <ISchoolRepository>();
            _organisatieRepository    = new Mock <IOrganisatieRepository>();
            _motivatieRopistory       = new Mock <IMotivatieRepository>();
            _berichtRopository        = new Mock <IBerichtRepository>();
            _controller               = new MotivatieController(_berichtRopository.Object, _organisatieRepository.Object, _motivatieRopistory.Object);
            _cursistZonderOrganisatie = new Cursist("Jochem", "Van Hespen", "*****@*****.**");
            _cursistZonderLector      = new Cursist("Fulvio", "Gentile", "*****@*****.**");
            var groep = new Groep("TestGroep", false);

            groep.Motivaties.Add(new Motivatie());

            Groep g   = new Groep("Groepje");
            var   org = new Organisatie("TestOrg", "*****@*****.**", new Locatie("s", 1, "be", 8800, "se"));
            var   cp1 = new Contactpersoon("jan", "janssen", "*****@*****.**", "meneer", "050222222", "ceo");

            Motivatie m = new Motivatie("Wij hebben deze jeudgwerking gekozen omdat de jeudgtrainers zich elke dag inzetten voor hun spelertjes.Ze streven om een familiale sportclub te zijn waar hun spelers zich thuis voelen en uitgedaagd worden om op een faire manier voetbal te spelen én zich in deze sport steeds verder te ontwikkelen. Ze dragen RESPECT hoog in het vaandel, en dit niet alleen tegenover elkaar, de tegenstrever en alle betrokken partijen (scheidsrechter, begeleiders, ouders,…), maar ook voor het materiaal en de infrastructuur. Door hun inzet en missie vinden wij dat ze goed bezig zijn. Daarom hebben we deze organisatie gekozen om aan hen het goed bezig label te schenken.")
            {
                Goedgekeurd = true
            };
            var cp = new Contactpersoon("jan", "janssen", "*****@*****.**", "meneer", "050222222", "ceo", org);

            m.Contactpersonen.Add(cp);
            org.Contactpersonen.Add(cp1);
            m.Organisatie = org;
            org.Contactpersonen.Add(cp);

            g.Motivaties.Add(m);
            g.GeefLaatstIngediendeMotivatie().Organisatie = org;


            _cursistMetGroepMetMeldingen = new Cursist("Robin", "Gammoudi", "*****@*****.**")
            {
                Groep     = new Groep("testgroep2", true),
                Lector    = lector,
                Meldingen = new List <Melding>()
                {
                    new Melding("U bent uitgenodigd", "testgroep2"),
                    new Melding("U bent uitgenodigd", "testgroep3"),
                    new Melding("U bent uitgenodigd", "testgroep4")
                }
            };
            _cursistMetGroepMetMeldingen.Groep.VoegCursistToe(_cursistZonderOrganisatie);

            _cursistMetGroepMetLector = new Cursist("Steve", "Sinaeve", "*****@*****.**")
            {
                School = _school,
                Lector = lector,
                Groep  = groep
            };
            _cursistZonderGroepMetLector = new Cursist("Jochem", "VanHespen", "*****@*****.**")
            {
                Lector = lector
            };
            _cursistMetGroepMetMotivatieGoedgekeurd = new Cursist("Robin", "Gammoudi", "*****@*****.**")
            {
                School = _school,
                Lector = lector,

                Groep = g,
            };
        }