public void should_return_the_defined_name() { Expression <Func <IAnInterface, string> > exp = x => x.FirstName; Expression <Func <IAnInterface, IAnInterface> > exp2 = x => x; MySimpleClass obj = new MySimpleClass(); Expression <Action <MySimpleVisitor> > exp3 = x => x.Visit(obj); Expression <Func <IList <IAnInterface>, IEnumerable <IAnInterface> > > exp4 = x => x.All(); exp.Name().ShouldBeEqualTo("FirstName"); exp2.Name().ShouldBeEqualTo("x"); exp3.Name().ShouldBeEqualTo("Visit"); exp4.Name().ShouldBeEqualTo("All"); }
protected override void Context() { base.Context(); _mySimpleClass = new MySimpleClass(); _visitor = null; }
protected override void Context() { base.Context(); _mySimpleClass = new MySimpleClass(); _visitor = new MyInterfaceBaseVisitor(); }
protected override void Context() { base.Context(); _visitor = new MyHierarchicalVisitor(); _mySimpleClass = new MySimpleClass(); }