Esempio n. 1
0
        public void AddTitleTest()
        {
            var          target = new ContentViewModel();
            const string text   = "A Title";

            target.AddTitle(text);

            ContentViewModel actual = target.AddTitle("Title");

            Assert.AreEqual(text, actual.GetContent().First(t => t.Type == ContentType.Title).Text);
            Assert.AreEqual("Title", actual.GetContent().Last(t => t.Type == ContentType.Title).Text);
        }
        public ActionResult FakeArea()
        {
            var model = new ContentViewModel();

            model.AddTitle("My fake area");

            return(View(model));
        }
Esempio n. 3
0
        public void GetContentTest()
        {
            var target = new ContentViewModel();

            target.AddTitle("Title");
            List <Content> actual = target.GetContent();

            Assert.AreEqual(1, actual.Count);
            Assert.AreEqual("Title", actual.First(t => t.Type == ContentType.Title).Text);
        }