コード例 #1
0
 public static Member GetMember <TType>(this FubuMVC.Swank.Specification.Type type, Expression <Func <TType, object> > member)
 {
     return(type.Members.Single(x => x.Name == member.GetMemberName()));
 }
コード例 #2
0
 public static void ShouldContainMember(this FubuMVC.Swank.Specification.Type type, string name)
 {
     type.Members.Count(x => x.Name == name)
     .ShouldEqual(1, "Should contain member {0}.".ToFormat(name));
 }
コード例 #3
0
 public static void ShouldNotContainMember <TType>(this FubuMVC.Swank.Specification.Type type, Expression <Func <TType, object> > member)
 {
     type.Members.Any(x => x.Name == member.GetMemberName())
     .ShouldBeFalse("Should not contain member {0}.".ToFormat(member.GetMemberName()));
 }
コード例 #4
0
 public static void ShouldContainMember <TType>(this FubuMVC.Swank.Specification.Type type, Expression <Func <TType, object> > member)
 {
     type.ShouldContainMember(member.GetMemberName());
 }