예제 #1
0
 public void MetaPopulatorPopulatesTimestamp()
 {
     var dateTime = new MetaPopulator(null).GetTime("24-09-2012 21:44");
     var time = dateTime;
     Assert.Equal(24, time.Day);
     Assert.Equal(9, time.Month);
     Assert.Equal(2012, time.Year);
     Assert.Equal(21, time.Hour);
     Assert.Equal(44, time.Minute);
 }
예제 #2
0
 public OrderedPostPopulatorSet(
     SlugPopulator slug,
     TitleAndContentPopulator titleAndContent,
     MetaPopulator meta,
     PostValidator validator)
 {
     populators.Add(slug); //Slug first, this will be in the error message, if others throw.
     populators.Add(titleAndContent);
     populators.Add(meta);
     populators.Add(validator); //Validator last, to see if the read values, satisfy the ValidationAttributes
 }
 public OrderedPostPopulatorSet(
     SlugPopulator slug, 
     TitleAndContentPopulator titleAndContent, 
     MetaPopulator meta, 
     PostValidator validator)
 {
     populators.Add(slug); //Slug first, this will be in the error message, if others throw.
     populators.Add(titleAndContent);
     populators.Add(meta);
     populators.Add(validator); //Validator last, to see if the read values, satisfy the ValidationAttributes
 }