Skip to content

Commit

Permalink
Fix test (#59)
Browse files Browse the repository at this point in the history
* Fix some test classes

* remove pragma
  • Loading branch information
ErikEJ authored Jan 22, 2025
1 parent 7fa6d03 commit 867a217
Show file tree
Hide file tree
Showing 61 changed files with 128 additions and 70 deletions.
2 changes: 1 addition & 1 deletion TSQLSmellsSSDTTest/TestConvertDate.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

#pragma warning disable IDE1006 // Naming Styles
[TestClass]
public class TestConvertDate : TestModel
{
Expand Down
1 change: 1 addition & 0 deletions TSQLSmellsSSDTTest/TestConvertInt.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

Expand Down
3 changes: 2 additions & 1 deletion TSQLSmellsSSDTTest/TestCreateProcedureNoSchema.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

Expand Down
1 change: 1 addition & 0 deletions TSQLSmellsSSDTTest/TestDisabledForeignKeyConstraint.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.SqlServer.Dac.Model;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TSQLSmellsSSDTTest;
namespace TSQLSmellsSSDTTest.TestHelpers;

public class TestModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Globalization;

namespace TSQLSmellsSSDTTest;
namespace TSQLSmellsSSDTTest.TestHelpers;

public class TestProblem
{
Expand Down
1 change: 1 addition & 0 deletions TSQLSmellsSSDTTest/TestWhiteListTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

Expand Down
1 change: 1 addition & 0 deletions TSQLSmellsSSDTTest/testConvertDateMultipleCond.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testConvertInt2.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testConvertInt2 : TestModel
public class TestConvertInt2 : TestModel
{
public testConvertInt2()
public TestConvertInt2()
{
TestFiles.Add("../../../../TSQLSmellsTest/ConvertInt2.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testCreateTableNoSchema.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testCreateTableNoSchema : TestModel
public class TestCreateTableNoSchema : TestModel
{
public testCreateTableNoSchema()
public TestCreateTableNoSchema()
{
TestFiles.Add("../../../../TSQLSmellsTest/CreateTableNoSchema.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testCreateViewOrderBy.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testCreateViewOrderBy : TestModel
public class TestCreateViewOrderBy : TestModel
{
public testCreateViewOrderBy()
public TestCreateViewOrderBy()
{
TestFiles.Add("../../../../TSQLSmellsTest/CreateViewOrderBy.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testCrossServerJoin.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testCrossServerJoin : TestModel
public class TestCrossServerJoin : TestModel
{
public testCrossServerJoin()
public TestCrossServerJoin()
{
TestFiles.Add("../../../../TSQLSmellsTest/TestCrossServerJoin.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testDeclareCursor.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testDeclareCursor : TestModel
public class TestDeclareCursor : TestModel
{
public testDeclareCursor()
public TestDeclareCursor()
{
TestFiles.Add("../../../../TSQLSmellsTest/DeclareCursor.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testDeprecatedType.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testDeprecatedType : TestModel
public class TestDeprecatedType : TestModel
{
public testDeprecatedType()
public TestDeprecatedType()
{
TestFiles.Add("../../../../TSQLSmellsTest/DeprecatedTypes.sql");
ExpectedProblems.Add(new TestProblem(4, 16, "Smells.SML047"));
Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testDeprecatedTypeSP.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testDeprecatedTypeSP : TestModel
public class TestDeprecatedTypeSP : TestModel
{
public testDeprecatedTypeSP()
public TestDeprecatedTypeSP()
{
TestFiles.Add("../../../../TSQLSmellsTest/DeprecatedTypesSP.sql");
ExpectedProblems.Add(new TestProblem(4, 14, "Smells.SML047"));
Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testDerived.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testDerived : TestModel
public class TestDerived : TestModel
{
public testDerived()
public TestDerived()
{
TestFiles.Add("../../../../TSQLSmellsTest/Derived.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testEqualsNull.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testEqualsNull : TestModel
public class TestEqualsNull : TestModel
{
public testEqualsNull()
public TestEqualsNull()
{
TestFiles.Add("../../../../TSQLSmellsTest/EqualsNull.sql");
ExpectedProblems.Add(new TestProblem(13, 39, "Smells.SML046"));
Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testExec1PartName.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testExec1PartName : TestModel
public class TestExec1PartName : TestModel
{
public testExec1PartName()
public TestExec1PartName()
{
TestFiles.Add("../../../../TSQLSmellsTest/Exec1PartName.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testExecSQL.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testExecSQL : TestModel
public class TestExecSQL : TestModel
{
public testExecSQL()
public TestExecSQL()
{
TestFiles.Add("../../../../TSQLSmellsTest/ExecSQL.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testExists.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testExists : TestModel
public class TestExists : TestModel
{
public testExists()
public TestExists()
{
TestFiles.Add("../../../../TSQLSmellsTest/Exists.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testExplicitRangeWindow.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testExplicitRangeWindow : TestModel
public class TestExplicitRangeWindow : TestModel
{
public testExplicitRangeWindow()
public TestExplicitRangeWindow()
{
TestFiles.Add("../../../../TSQLSmellsTest/ExplicitRangeWindow.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testForceScan.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testForceScan : TestModel
public class TestForceScan : TestModel
{
public testForceScan()
public TestForceScan()
{
TestFiles.Add("../../../../TSQLSmellsTest/ForceScan.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testImplicitRangeWindow.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testImplicitRangeWindow : TestModel
public class TestImplicitRangeWindow : TestModel
{
public testImplicitRangeWindow()
public TestImplicitRangeWindow()
{
TestFiles.Add("../../../../TSQLSmellsTest/ImplicitRangeWindow.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testInsertMissingColumnSpecifiers.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testInsertMissingColumnSpecifiers : TestModel
public class TestInsertMissingColumnSpecifiers : TestModel
{
public testInsertMissingColumnSpecifiers()
public TestInsertMissingColumnSpecifiers()
{
TestFiles.Add("../../../../TSQLSmellsTest/InsertMissingColumnSpecifiers.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testInsertSelectStar.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testInsertSelectStar : TestModel
public class TestInsertSelectStar : TestModel
{
public testInsertSelectStar()
public TestInsertSelectStar()
{
TestFiles.Add("../../../../TSQLSmellsTest/InsertSelectStar.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testLagFunction.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testLagFunction : TestModel
public class TestLagFunction : TestModel
{
public testLagFunction()
public TestLagFunction()
{
TestFiles.Add("../../../../TSQLSmellsTest/LAGFunction.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testMultiCteTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testMultiCteTest : TestModel
public class TestMultiCteTest : TestModel
{
public testMultiCteTest()
public TestMultiCteTest()
{
TestFiles.Add("../../../../TSQLSmellsTest/MultiCteTest.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testOnePartNamedSelect.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testOnePartNamedSelect : TestModel
public class TestOnePartNamedSelect : TestModel
{
public testOnePartNamedSelect()
public TestOnePartNamedSelect()
{
TestFiles.Add("../../../../TSQLSmellsTest/TestOnePartNamedSelect.sql");

Expand Down
7 changes: 4 additions & 3 deletions TSQLSmellsSSDTTest/testOrderByOrdinal.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TSQLSmellsSSDTTest.TestHelpers;

namespace TSQLSmellsSSDTTest;

[TestClass]
public class testOrderByOrdinal : TestModel
public class TestOrderByOrdinal : TestModel
{
public testOrderByOrdinal()
public TestOrderByOrdinal()
{
TestFiles.Add("../../../../TSQLSmellsTest/orderbyordinal.sql");

Expand Down
Loading

0 comments on commit 867a217

Please sign in to comment.