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())); }
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)); }
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())); }
public static void ShouldContainMember <TType>(this FubuMVC.Swank.Specification.Type type, Expression <Func <TType, object> > member) { type.ShouldContainMember(member.GetMemberName()); }