mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 09:35:38 -05:00
Convert most tools service tests to nunit (#1037)
* Remove xunit dependency from testdriver * swap expected/actual as needed * Convert Test.Common to nunit * port hosting unit tests to nunit * port batchparser integration tests to nunit * port testdriver.tests to nunit * fix target to copy dependency * port servicelayer unittests to nunit * more unit test fixes * port integration tests to nunit * fix test method type * try using latest windows build for PRs * reduce test memory use
This commit is contained in:
@@ -5,42 +5,48 @@
|
||||
|
||||
|
||||
using Microsoft.SqlTools.ServiceLayer.Formatter;
|
||||
using Xunit;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Formatter
|
||||
{
|
||||
|
||||
public class InsertFormatterTests : FormatterUnitTestsBase
|
||||
{
|
||||
[Fact]
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
InitFormatterUnitTestsBase();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Insert_DefaultValues()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_DefaultValues", GetInputFile("Insert_DefaultValues.sql"),
|
||||
GetBaselineFile("Insert_DefaultValues.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_OpenQuery()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_OpenQuery", GetInputFile("Insert_OpenQuery.sql"),
|
||||
GetBaselineFile("Insert_OpenQuery.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_OutputInto()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_OutputInto", GetInputFile("Insert_OutputInto.sql"),
|
||||
GetBaselineFile("Insert_OutputInto.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_OutputStatement()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_OutputStatement", GetInputFile("Insert_OutputStatement.sql"),
|
||||
GetBaselineFile("Insert_OutputStatement.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_Select()
|
||||
{
|
||||
FormatOptions options = new FormatOptions();
|
||||
@@ -49,7 +55,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Formatter
|
||||
GetBaselineFile("Insert_Select.sql"), options, true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_SelectSource()
|
||||
{
|
||||
FormatOptions options = new FormatOptions();
|
||||
@@ -58,21 +64,21 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Formatter
|
||||
GetBaselineFile("Insert_SelectSource.sql"), options, true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_TopSpecification()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_TopSpecification", GetInputFile("Insert_TopSpecification.sql"),
|
||||
GetBaselineFile("Insert_TopSpecification.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_TopWithComments()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_TopWithComments", GetInputFile("Insert_TopWithComments.sql"),
|
||||
GetBaselineFile("Insert_TopWithComments.sql"), new FormatOptions(), true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Test]
|
||||
public void Insert_Full()
|
||||
{
|
||||
LoadAndFormatAndCompare("Insert_Full", GetInputFile("Insert_Full.sql"),
|
||||
|
||||
Reference in New Issue
Block a user