Skip to content

Commit

Permalink
VB Tests: Use a copy of Northwind
Browse files Browse the repository at this point in the history
Resolves #30820
  • Loading branch information
bricelam committed Jun 30, 2023
1 parent 81c2440 commit 4ea0ee8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Microsoft.EntityFrameworkCore.VisualBasic.FunctionalTests</AssemblyName>
<!-- Skipping flaky tests due to #30820 -->
<SkipTests>True</SkipTests>
<SkipTests Condition="'$(OS)' != 'Windows_NT' AND '$(Test__SqlServer__DefaultConnection)' == ''">True</SkipTests>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Imports Microsoft.EntityFrameworkCore.TestUtilities
Imports Xunit

Partial Public Class NorthwindQueryVisualBasicTest
Inherits QueryTestBase(Of NorthwindQuerySqlServerFixture(Of NoopModelCustomizer))
Inherits QueryTestBase(Of NorthwindVBQuerySqlServerFixture(Of NoopModelCustomizer))

Public Sub New(fixture As NorthwindQuerySqlServerFixture(Of NoopModelCustomizer))
Public Sub New(fixture As NorthwindVBQuerySqlServerFixture(Of NoopModelCustomizer))
MyBase.New(fixture)

fixture.TestSqlLoggerFactory.Clear()
Expand Down Expand Up @@ -85,7 +85,7 @@ FROM [Products] AS [p]
WHERE [p].[UnitsInStock] * CAST(1 AS smallint) = CAST(101 AS smallint)")
End Sub

Protected Overrides Function CreateQueryAsserter(fixture As NorthwindQuerySqlServerFixture(Of NoopModelCustomizer)) As QueryAsserter
Protected Overrides Function CreateQueryAsserter(fixture As NorthwindVBQuerySqlServerFixture(Of NoopModelCustomizer)) As QueryAsserter
Return New RelationalQueryAsserter(
fixture, AddressOf RewriteExpectedQueryExpression, AddressOf RewriteServerQueryExpression, canExecuteQueryString:=True)
End Function
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.

Imports Microsoft.EntityFrameworkCore.Infrastructure
Imports Microsoft.EntityFrameworkCore.Query

Public Class NorthwindVBQuerySqlServerFixture(Of TModelCustomizer As {IModelCustomizer, New})
Inherits NorthwindQuerySqlServerFixture(Of TModelCustomizer)

Protected Overrides ReadOnly Property StoreName As String
Get
Return "NorthwindVB"
End Get
End Property
End Class

0 comments on commit 4ea0ee8

Please sign in to comment.