Beispiel #1
0
 public static IProp <T> Check <T>(this IProp <T> prop, Action <T> assertion)
 {
     return(new PropImplementation <T>(() =>
     {
         var value = prop.Get();
         assertion(value);
         return value;
     }, prop.GetDescription()));
 }
Beispiel #2
0
 internal static void AssertEqualTo <T>(this IProp <T> actual, T expected)
 {
     AssertEqualTo(actual.Get(), expected, actual.GetDescription());
 }
Beispiel #3
0
 internal static void AssertStartsWith(this IProp <string> actual, string expected)
 {
     AssertStartsWith(actual.Get(), expected, actual.GetDescription());
 }
Beispiel #4
0
 public static void Assert <T>(this IProp <T> property, IResolveConstraint constraint)
 {
     NUnit.Framework.Assert.That(property.Get(), new ReusableConstraint(constraint), property.GetDescription());
 }
Beispiel #5
0
 public static IProp <TNew> Transform <T, TNew>(this IProp <T> prop, Func <T, TNew> transform)
 {
     return(new PropImplementation <TNew>(() => transform(prop.Get()), prop.GetDescription()));
 }