Skip to content

Commit

Permalink
Implemented Visit(ConstructorInfoElement) method.
Browse files Browse the repository at this point in the history
  • Loading branch information
moodmosaic committed Nov 10, 2013
1 parent de962ad commit 152b036
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Src/Albedo.UnitTests/ReflectionVisitorTests.cs
Expand Up @@ -28,6 +28,20 @@ public void VisitAssemblyElementReturnsCorrectResult()
Assert.Same(expected, actual);
}

[Fact]
public void VisitConstructorInfoElementReturnsCorrectResult()
{
var sut = new ReflectionVisitor();
var constructorInfoElement =
new ConstructorInfoElement(
this.GetType().GetConstructor(Type.EmptyTypes));

var actual = sut.Visit(constructorInfoElement);

var expected = sut;
Assert.Same(expected, actual);
}

private class ReflectionVisitor : ReflectionVisitor<T>
{
public override T Value
Expand Down
5 changes: 3 additions & 2 deletions Src/Albedo/ReflectionVisitor.cs
Expand Up @@ -15,9 +15,10 @@ public abstract class ReflectionVisitor<T> : IReflectionVisitor<T>
return this;
}

public virtual IReflectionVisitor<T> Visit(ConstructorInfoElement constructorInfoElement)
public virtual IReflectionVisitor<T> Visit(
ConstructorInfoElement constructorInfoElement)
{
throw new NotImplementedException();
return this;
}

public virtual IReflectionVisitor<T> Visit(FieldInfoElement fieldInfoElement)
Expand Down

0 comments on commit 152b036

Please sign in to comment.