示例#1
0
        public void HabbitValidationValidNamePrefix()
        {
            var habbit = new Habbit();
            var name = "abc";

            Assert.IsTrue(habbit.Add(name).Equals("Привычка: " + name));
        }
示例#2
0
 public void HabbitValidationMinLength()
 {
     Assert.Throws<ArgumentException>(() =>
     {
         var habbit = new Habbit();
         habbit.Add("1");
     }
     );
 }
示例#3
0
 public void HabbitValidationValidName()
 {
     Assert.DoesNotThrow(() =>
     {
         var habbit = new Habbit();
         habbit.Add("Abc");
     }
     );
 }
示例#4
0
 public void HabbitValidationEmptyName()
 {
     Assert.Throws<ArgumentException>(()=>
     {
         var habbit = new Habbit();
         habbit.Add("");
     }
 );
 }