Esempio n. 1
0
        public static Asserter <SaveFile <T> > Exists <T>(this Asserter <SaveFile <T> > self, bool expectedExistence = true) where T : ISaveData
        {
            ConstraintExpression constraint = Has.Property(nameof(SaveFile <T> .FileSystemInfo));

            constraint = expectedExistence ? constraint : constraint.Not;
            return(self.And(constraint.Exist));
        }
Esempio n. 2
0
 public static Asserter <ISaveFile <T> > TimeStamped <T>(this Asserter <ISaveFile <T> > self, DateTime expectedTimeStamp) where T : ISaveData
 {
     return(self.And(Has.Property(nameof(ISaveFile <ISaveData> .TimeStamp)).EqualTo(expectedTimeStamp)));
 }
Esempio n. 3
0
 public static Asserter <ISaveFile <T> > Nicknamed <T>(this Asserter <ISaveFile <T> > self, string expectedNickname) where T : ISaveData
 {
     return(self.And(Has.Property(nameof(ISaveFile <ISaveData> .Nickname)).EqualTo(expectedNickname)));
 }