Ejemplo n.º 1
0
 public void ValidNickname()
 {
     NoticeCommand noticeCommand = new NoticeCommand();
     try
     {
         noticeCommand.Nickname = "ç";
         Assert.Fail();
     }
     catch(ArgumentException)
     {
     }
     catch
     {
         Assert.Fail();
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 3
0
 public void NicknameProperty()
 {
     NoticeCommand noticeCommand = new NoticeCommand();
     noticeCommand.Nickname = "Xpto";
     Assert.AreEqual("Xpto", noticeCommand.Nickname);
 }