Example #1
0
 public void ValidNickname()
 {
     NoticeCommand noticeCommand = new NoticeCommand();
     try
     {
         noticeCommand.Nickname = "รง";
         Assert.Fail();
     }
     catch(ArgumentException)
     {
     }
     catch
     {
         Assert.Fail();
     }
 }
Example #2
0
 public void NicknameCantBeNull()
 {
     NoticeCommand noticeCommand = new NoticeCommand();
     try
     {
         noticeCommand.Nickname = null;
         Assert.Fail();
     }
     catch(ArgumentNullException exception)
     {
         Assert.AreEqual("Nickname", exception.ParamName);
     }
     catch
     {
         Assert.Fail();
     }
 }
Example #3
0
 public void NicknameProperty()
 {
     NoticeCommand noticeCommand = new NoticeCommand();
     noticeCommand.Nickname = "Xpto";
     Assert.AreEqual("Xpto", noticeCommand.Nickname);
 }