示例#1
0
        public void IsPostTooLong()
        {
            Library.Models.Post post = new Library.Models.Post();

            // 282 Character string
            string longString = "Lorem ipsum dolor sit amet consectetur adipiscing elit," +
                                " mollis lectus est tempus auctor malesuada, nam sociis dignissim habitant" +
                                " nec varius litora, vestibulum sem vel odio etiam. Arcu dignissim quis sem" +
                                " tempor ac ornare praesent eget nascetur, et malessuada class habitasse egestas.";

            Assert.Throws <ArgumentOutOfRangeException>(() => post.Content = longString);
        }
示例#2
0
 public void IsPostEmpty(string content)
 {
     Library.Models.Post post = new Library.Models.Post();
     Assert.Throws <ArgumentOutOfRangeException>(() => post.Content = content);
 }
示例#3
0
 public void IsPostNull(string content)
 {
     Library.Models.Post post = new Library.Models.Post();
     Assert.Throws <ArgumentNullException>(() => post.Content = content);
 }