Skip to content

Commit

Permalink
Exercised the selection of generic methods in non-generic types using…
Browse files Browse the repository at this point in the history
… LINQ syntax.
  • Loading branch information
moodmosaic committed Mar 5, 2014
1 parent 3820fe6 commit 58e20cc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Src/Albedo.UnitTests/MethodsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ public void SelectParameterLessGenericReturnsCorrectMethod()
.GetMethod("OmitParametersGeneric")
.MakeGenericMethod(typeof(T));
Assert.Equal(expected, actual);
}

[Fact]
public void QueryParameterLessGenericMethodUsingLinqSyntax()
{
var sut = new Methods<ClassWithMethods>();

var actual = from x in sut select x.OmitParametersGeneric<T>();

var expected =
typeof(ClassWithMethods)
.GetMethod("OmitParametersGeneric")
.MakeGenericMethod(typeof(T));
Assert.Equal(expected, actual);
}

private class ClassWithMethods
Expand Down

0 comments on commit 58e20cc

Please sign in to comment.