Ejemplo n.º 1
0
        public void It_Renders_View_Using_View_Path()
        {
            var spark = new SparkTest();
            var view = new StringBuilder();

            spark.ViewPath().Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello, ViewPath!</h1>", view.ToString());
        }
Ejemplo n.º 2
0
        public void It_Renders_View_Using_Model()
        {
            var spark = new SparkTest();
            var view = new StringBuilder();

            spark.Model(new MessageViewModel { Message = "Hello, Model!" }).Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello, Model!</h1>", view.ToString());
        }
Ejemplo n.º 3
0
        public void It_Renders_View_Using_View_Path()
        {
            var spark = new SparkTest();
            var view  = new StringBuilder();

            spark.ViewPath().Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello, ViewPath!</h1>", view.ToString());
        }
Ejemplo n.º 4
0
        public void It_Renders_View_With_An_Empty_Constructor()
        {
            var spark = new SparkTest();
            var view  = new StringBuilder();

            spark.Empty().Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello!</h1>", view.ToString());
        }
Ejemplo n.º 5
0
        public void It_Renders_View_Using_Model()
        {
            var spark = new SparkTest();
            var view  = new StringBuilder();

            spark.Model(new MessageViewModel {
                Message = "Hello, Model!"
            }).Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello, Model!</h1>", view.ToString());
        }
Ejemplo n.º 6
0
        public void It_Renders_View_With_An_Empty_Constructor()
        {
            var spark = new SparkTest();
            var view = new StringBuilder();

            spark.Empty().Each(str => view.Append(str));

            Assert.AreEqual("<h1>Hello!</h1>", view.ToString());
        }