|
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Recommendations.Queries
<Trait(Traits.Feature, Traits.Features.KeywordRecommending)>
Public Class JoinKeywordRecommenderTests
Inherits RecommenderTests
<Fact>
Public Sub JoinNotInStatementTest()
VerifyRecommendationsMissing(<MethodBody>|</MethodBody>, "Join")
End Sub
<Fact>
Public Sub JoinInQueryTest()
VerifyRecommendationsContain(<MethodBody>Dim x = From y In z |</MethodBody>, "Join")
End Sub
<Fact, WorkItem("http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543078")>
Public Sub NothingAfterJoinInQueryTest()
VerifyRecommendationsAreExactly(<MethodBody>Dim x = From y In z Join |</MethodBody>, Array.Empty(Of String)())
End Sub
<Fact>
Public Sub JoinAfterJoinInQueryTest()
VerifyRecommendationsContain(<MethodBody>Dim x = From y In z Join w In z On w.Id Equals y.Id |</MethodBody>, "Join")
End Sub
<Fact, WorkItem("http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543173")>
Public Sub JoinAfterMultiLineFunctionLambdaExprTest()
VerifyRecommendationsContain(<MethodBody>Dim q2 = From i1 In arr Order By Function()
Return 5
End Function |</MethodBody>, "Join")
End Sub
<Fact, WorkItem("http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543174")>
Public Sub JoinAfterAnonymousObjectCreationExprTest()
VerifyRecommendationsContain(<MethodBody>Dim q2 = From i1 In arr Order By New With {.Key = 10} |</MethodBody>, "Join")
End Sub
<Fact, WorkItem("http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543219")>
Public Sub JoinAfterIntoClauseTest()
VerifyRecommendationsContain(<MethodBody>Dim q1 = From i1 In arr Group By i1 Into Count |</MethodBody>, "Join")
End Sub
<Fact, WorkItem("http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543232")>
Public Sub JoinAfterNestedAggregateFromClauseTest()
VerifyRecommendationsContain(<MethodBody>Dim q1 = Aggregate i1 In arr From i4 In arr |</MethodBody>, "Join")
End Sub
End Class
End Namespace
|