Exemple #1
0
        public void BeDeserializable()
        {
            var q = File.ReadAllText(Path.Combine(TestContext.CurrentContext.TestDirectory, "Quizes", "test.quiz.xml")).DeserializeXml <Quiz>();

            QuizSlideLoader.BuildUp(q, new Unit(null, new DirectoryInfo(TestContext.CurrentContext.TestDirectory)), "QuizzesTest", CourseSettings.DefaultSettings);
            q.ShouldBeEquivalentTo(new Quiz
            {
                Id     = "{DB95DA10-7DD2-46CA-BFB2-6D0D7554B83F}",
                Title  = "title",
                Blocks = new SlideBlock[]
                {
                    new MdBlock("para"),
                    new CodeBlock("code", "cs", "7"),
                    new MdBlock("para2"),
                    new CodeBlock("code2", "cs", "7"),
                    new MdBlock("para3"),
                    new MdBlock("note")
                    {
                        Hide = true
                    },
                    new MdBlock("hidden")
                    {
                        Hide = true
                    },
                }
            });
        }
Exemple #2
0
        public void BeDeserializable()
        {
            var q = File.ReadAllText("Quizes/test.quiz.xml").DeserializeXml <Quiz>();

            QuizSlideLoader.BuildUp(q, null, CourseSettings.DefaultSettings);
            q.ShouldBeEquivalentTo(new Quiz
            {
                Id     = "{DB95DA10-7DD2-46CA-BFB2-6D0D7554B83F}",
                Title  = "title",
                Blocks = new SlideBlock[]
                {
                    new MdBlock("para"),
                    new CodeBlock("code", null),
                    new MdBlock("para2"),
                    new CodeBlock("code2", null),
                    new MdBlock("para3"),
                    new MdBlock("note")
                    {
                        Hide = true
                    },
                    new MdBlock("hidden")
                    {
                        Hide = true
                    },
                }
            });
        }