Ejemplo n.º 1
0
        public ActionResult StartOverhoring(string id)
        {
            OverhoringLogic      logic = new OverhoringLogic();
            StartOverhoringModel model = new StartOverhoringModel();

            if (id.Contains("$"))
            {
                model.Overhoring = logic.Start(id.Split("$")[1], id.Split("$")[0]);
            }
            else
            {
                model.Overhoring = logic.Start(id, HttpContext.Session.GetString("Username"));
            }
            List <string[]> toJsonList = new List <string[]>();

            foreach (Woord w in model.Overhoring.WoordenLijst)
            {
                string[] s = new string[2];
                s[0] = w.Begrip;
                s[1] = w.Betekenis;
                toJsonList.Add(s);
            }
            model.Jsonstring = JsonConvert.SerializeObject(toJsonList);
            return(View(model));
        }
Ejemplo n.º 2
0
        public void StartOverhoring()
        {
            OverhoringLogic logic = new OverhoringLogic();

            Makelist();
            Assert.IsNotNull(logic.Start("De Titel%Vraag=Begrip?Antwoord=Betekenis|Soort=Standaard|Optie=StandaardVologorde|", "Quinn2500"), "Kan overhoring niet starten");
            DeleteList("De Titel", "Quinn2500");
        }