Validate() public method

public Validate ( IEnumerable cells ) : IList
cells IEnumerable
return IList
Example #1
0
 public void find_a_missing_attribute()
 {
     Step step = new Step().With("a:1,b:2");
     step.Validate(cells).ShouldHaveTheSameElementsAs(new PropertyError
     {
         Attribute = "c",
         Code = PropertyErrorCode.Missing
     });
 }
Example #2
0
 public void do_not_log_a_missing_attribute_if_the_cell_has_a_default_value()
 {
     Step step = new Step().With("b:2,c:3");
     step.Validate(cells).Count.ShouldEqual(0);
 }
Example #3
0
 public void find_an_extra_attribute()
 {
     Step step = new Step().With("a:1,b:2,c:3,d:4");
     step.Validate(cells).ShouldHaveTheSameElementsAs(new PropertyError
     {
         Attribute = "d",
         Code = PropertyErrorCode.Unknown
     });
 }
Example #4
0
 public void all_valid_step()
 {
     Step step = new Step().With("a:1,b:2,c:3");
     step.Validate(cells).Count.ShouldEqual(0);
 }