Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed automated tests to use NUnit

  • Loading branch information...
commit bb08cbda3896254b9c6f81a0ab2dd286009ef5c1 1 parent 639c349
@markrendle authored
Showing with 184 additions and 175 deletions.
  1. +29 −29 Simple.Data.IntegrationTest/DatabaseTest.cs
  2. +12 −9 Simple.Data.IntegrationTest/NameResolutionTests.cs
  3. +8 −6 Simple.Data.IntegrationTest/NaturalJoinTest.cs
  4. +1 −1  Simple.Data.IntegrationTest/Simple.Data.IntegrationTest.csproj
  5. +3 −3 Simple.Data.Mocking.Test/MockConnectionSchemaTest.cs
  6. +1 −1  Simple.Data.Mocking.Test/Simple.Data.Mocking.Test.csproj
  7. +6 −6 Simple.Data.Mocking.Test/XmlMockAdapterTest.cs
  8. +5 −0 Simple.Data.Mocking/Ado/MockSchemaProvider.cs
  9. +9 −9 Simple.Data.SqlCe35Test/FindTests.cs
  10. +3 −3 Simple.Data.SqlCe35Test/OrderDetailTests.cs
  11. +9 −9 Simple.Data.SqlCe35Test/SchemaTests/DatabaseSchemaTests.cs
  12. +1 −1  Simple.Data.SqlCe35Test/Simple.Data.SqlCe35Test.csproj
  13. +9 −9 Simple.Data.SqlTest/FindTests.cs
  14. +3 −3 Simple.Data.SqlTest/NaturalJoinTest.cs
  15. +3 −3 Simple.Data.SqlTest/OrderDetailTests.cs
  16. +8 −8 Simple.Data.SqlTest/SchemaTests/DatabaseSchemaTests.cs
  17. +1 −1  Simple.Data.SqlTest/Simple.Data.SqlTest.csproj
  18. +3 −3 Simple.Data.UnitTest/DataRecordExtensionsTest.cs
  19. +5 −5 Simple.Data.UnitTest/DynamicRecordTest.cs
  20. +13 −13 Simple.Data.UnitTest/DynamicReferenceTest.cs
  21. +3 −3 Simple.Data.UnitTest/DynamicStringExtensionsTest.cs
  22. +3 −3 Simple.Data.UnitTest/DynamicTableTest.cs
  23. +1 −1  Simple.Data.UnitTest/ListHelper.cs
  24. +9 −9 Simple.Data.UnitTest/MethodNameParserTest.cs
  25. +1 −2  Simple.Data.UnitTest/Simple.Data.UnitTest.csproj
  26. +8 −8 Simple.Data.UnitTest/SimpleExpressionTest.cs
  27. +17 −17 Simple.Data.UnitTest/StringExtensionsTest.cs
  28. +10 −10 Simple.Data.UnitTest/TableCollectionTest.cs
View
58 Simple.Data.IntegrationTest/DatabaseTest.cs
@@ -5,12 +5,12 @@
using System.Dynamic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Mocking.Ado;
namespace Simple.Data.IntegrationTest
{
- [TestClass]
+ [TestFixture]
public class DatabaseTest
{
[ThreadStatic]
@@ -31,120 +31,120 @@ static Database CreateDatabase()
return new Database(new MockConnectionProvider(new MockDbConnection()));
}
- [TestMethod]
+ [Test]
public void TestFindEqualWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id == 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] = @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [users].* from [users] where [users].[id] = @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindNotEqualWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id != 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] != @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] != @p1".ToLowerInvariant().ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindGreaterThanWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id > 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] > @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] > @p1".ToLowerInvariant().ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindGreaterThanOrEqualWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id >= 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] >= @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] >= @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindLessThanWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id < 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] < @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] < @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindLessThanOrEqualWithInt32()
{
TestDatabase.Users.Find(TestDatabase.Users.Id <= 1);
- Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] <= @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[Id] <= @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindByDynamicSingleColumn()
{
TestDatabase.Users.FindByName("Foo");
- Assert.AreEqual("select [Users].* from [Users] where [Users].[name] like @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[name] like @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Foo", MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestFindByDynamicTwoColumns()
{
TestDatabase.Users.FindByNameAndPassword("Foo", "secret");
- Assert.AreEqual("select [Users].* from [Users] where ([Users].[name] like @p1 and [Users].[password] like @p2)", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where ([Users].[name] like @p1 and [Users].[password] like @p2)".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Foo", MockDatabase.Parameters[0]);
Assert.AreEqual("secret", MockDatabase.Parameters[1]);
}
- [TestMethod]
+ [Test]
public void TestFindAllByDynamic()
{
TestDatabase.Users.FindAllByName("Foo");
- Assert.AreEqual("select [Users].* from [Users] where [Users].[name] like @p1", MockDatabase.Sql, true);
+ Assert.AreEqual("select [Users].* from [Users] where [Users].[name] like @p1".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Foo", MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestInsertWithNamedArguments()
{
TestDatabase.Users.Insert(Name: "Steve", Age: 50);
- Assert.AreEqual("insert into [Users] ([Name],[Age]) values (@p0,@p1)", MockDatabase.Sql, true);
+ Assert.AreEqual("insert into [Users] ([Name],[Age]) values (@p0,@p1)".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Steve", MockDatabase.Parameters[0]);
Assert.AreEqual(50, MockDatabase.Parameters[1]);
}
- [TestMethod]
+ [Test]
public void TestUpdateWithNamedArguments()
{
TestDatabase.Users.UpdateById(Id: 1, Name: "Steve", Age: 50);
- Assert.AreEqual("update [Users] set [Name] = @p0, [Age] = @p1 where [Id] = @p2", MockDatabase.Sql, true);
+ Assert.AreEqual("update [Users] set [Name] = @p0, [Age] = @p1 where [Id] = @p2".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Steve", MockDatabase.Parameters[0]);
Assert.AreEqual(50, MockDatabase.Parameters[1]);
Assert.AreEqual(1, MockDatabase.Parameters[2]);
}
- [TestMethod]
+ [Test]
public void TestDeleteWithNamedArguments()
{
TestDatabase.Users.Delete(Id: 1);
- Assert.AreEqual("delete from [Users] where [Id] = @p0", MockDatabase.Sql, true);
+ Assert.AreEqual("delete from [Users] where [Id] = @p0".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(1, MockDatabase.Parameters[0]);
}
- [TestMethod]
+ [Test]
public void TestInsertOnTable()
{
dynamic person = new ExpandoObject();
person.Name = "Phil";
person.Age = 42;
TestDatabase.Users.Insert(person);
- Assert.AreEqual("insert into [Users] ([Name],[Age]) values (@p0,@p1)", MockDatabase.Sql, true);
+ Assert.AreEqual("insert into [Users] ([Name],[Age]) values (@p0,@p1)".ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual("Phil", MockDatabase.Parameters[0]);
Assert.AreEqual(42, MockDatabase.Parameters[1]);
}
- [TestMethod]
+ [Test]
public void TestAllPropertyShouldWriteDeprecatedMessageToTrace()
{
var traceListener = new TestTraceListener();
View
21 Simple.Data.IntegrationTest/NameResolutionTests.cs
@@ -3,16 +3,17 @@
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Mocking.Ado;
namespace Simple.Data.IntegrationTest
{
- [TestClass]
+ [TestFixture]
public class NameResolutionTests
{
static Database CreateDatabaseWithSingularNames()
{
+ MockSchemaProvider.Reset();
MockSchemaProvider.SetTables(new[] { "dbo", "Customer", "BASE TABLE" },
new[] { "dbo", "Orders", "BASE TABLE" });
MockSchemaProvider.SetColumns(new[] { "dbo", "Customer", "CustomerId" },
@@ -24,25 +25,27 @@ static Database CreateDatabaseWithSingularNames()
return new Database(new MockConnectionProvider(new MockDbConnection()));
}
- [TestMethod]
+ [Test]
public void NaturalJoinCreatesCorrectCommand()
{
// Arrange
dynamic database = CreateDatabaseWithSingularNames();
var orderDate = new DateTime(2010, 1, 1);
- const string expectedSql = "select [Customer].* from [Customer] join [Orders] on ([Customer].[CustomerId] = [Orders].[CustomerId]) where [Orders].[OrderDate] = @p1";
+ string expectedSql =
+ "select [Customer].* from [Customer] join [Orders] on ([Customer].[CustomerId] = [Orders].[CustomerId]) where [Orders].[OrderDate] = @p1".ToLowerInvariant();
// Act
database.Customer.Find(database.Customers.Orders.OrderDate == orderDate);
// Assert
- Assert.AreEqual(expectedSql, MockDatabase.Sql, true);
+ Assert.AreEqual(expectedSql, MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(orderDate, MockDatabase.Parameters[0]);
}
static Database CreateDatabaseWithShoutyNames()
{
+ MockSchemaProvider.Reset();
MockSchemaProvider.SetTables(new[] { "dbo", "CUSTOMER", "BASE TABLE" },
new[] { "dbo", "ORDER", "BASE TABLE" });
MockSchemaProvider.SetColumns(new[] { "dbo", "CUSTOMER", "CUSTOMER_ID" },
@@ -54,21 +57,21 @@ static Database CreateDatabaseWithShoutyNames()
return new Database(new MockConnectionProvider(new MockDbConnection(SchemaHelper.DummySchema())));
}
- [TestMethod]
+ [Test]
public void NaturalJoinWithShoutyCaseCreatesCorrectCommand()
{
// Arrange
dynamic database = CreateDatabaseWithShoutyNames();
var orderDate = new DateTime(2010, 1, 1);
- const string expectedSql = "select [CUSTOMER].* from [CUSTOMER] join [ORDER] on ([CUSTOMER].[CUSTOMER_ID] = [ORDER].[CUSTOMER_ID])"
- + " where [ORDER].[ORDER_DATE] = @p1";
+ string expectedSql = "select [CUSTOMER].* from [CUSTOMER] join [ORDER] on ([CUSTOMER].[CUSTOMER_ID] = [ORDER].[CUSTOMER_ID])"
+ + " where [ORDER].[ORDER_DATE] = @p1";
// Act
database.Customer.Find(database.Customers.Orders.OrderDate == orderDate);
// Assert
- Assert.AreEqual(expectedSql, MockDatabase.Sql, true);
+ Assert.AreEqual(expectedSql.ToLowerInvariant(), MockDatabase.Sql.ToLowerInvariant());
Assert.AreEqual(orderDate, MockDatabase.Parameters[0]);
}
}
View
14 Simple.Data.IntegrationTest/NaturalJoinTest.cs
@@ -3,16 +3,17 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Mocking.Ado;
namespace Simple.Data.IntegrationTest
{
- [TestClass]
+ [TestFixture]
public class NaturalJoinTest
{
static Database CreateDatabase()
{
+ MockSchemaProvider.Reset();
MockSchemaProvider.SetTables(new[] {"dbo", "Customer", "BASE TABLE"},
new[] {"dbo", "Orders", "BASE TABLE"});
MockSchemaProvider.SetColumns(new[] {"dbo", "Customer", "CustomerId"},
@@ -24,20 +25,21 @@ static Database CreateDatabase()
return new Database(new MockConnectionProvider(new MockDbConnection()));
}
- [TestMethod]
+ [Test]
public void NaturalJoinCreatesCorrectCommand()
{
// Arrange
dynamic database = CreateDatabase();
var orderDate = new DateTime(2010, 1, 1);
- const string expectedSql = "select [Customer].* from [Customer] join [Orders] on ([Customer].[CustomerId] = [Orders].[CustomerId]) where [Orders].[OrderDate] = @p1";
+ const string expectedSql =
+ "select [Customer].* from [Customer] join [Orders] on ([Customer].[CustomerId] = [Orders].[CustomerId]) where [Orders].[OrderDate] = @p1";
// Act
database.Customer.Find(database.Customer.Orders.OrderDate == orderDate);
- var actualSql = Regex.Replace(MockDatabase.Sql, @"\s+", " ");
+ var actualSql = Regex.Replace(MockDatabase.Sql, @"\s+", " ").ToLowerInvariant();
// Assert
- Assert.AreEqual(expectedSql, actualSql, true);
+ Assert.AreEqual(expectedSql.ToLowerInvariant(), actualSql);
Assert.AreEqual(orderDate, MockDatabase.Parameters[0]);
}
}
View
2  Simple.Data.IntegrationTest/Simple.Data.IntegrationTest.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
View
6 Simple.Data.Mocking.Test/MockConnectionSchemaTest.cs
@@ -3,14 +3,14 @@
using System.Text;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.Mocking.Test
{
- [TestClass]
+ [TestFixture]
public class MockConnectionSchemaTest
{
- [TestMethod]
+ [Test]
public void TestMethod1()
{
}
View
2  Simple.Data.Mocking.Test/Simple.Data.Mocking.Test.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
View
12 Simple.Data.Mocking.Test/XmlMockAdapterTest.cs
@@ -1,7 +1,7 @@
// ReSharper disable InconsistentNaming
using System.Collections.Generic;
using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.Mocking.Test
{
@@ -9,10 +9,10 @@ namespace Simple.Data.Mocking.Test
///This is a test class for XmlStubAdapterTest and is intended
///to contain all XmlStubAdapterTest Unit Tests
///</summary>
- [TestClass]
+ [TestFixture]
public class XmlMockAdapterTest
{
- [TestInitialize]
+ [TestFixtureSetUp]
public void MyTestInitialize()
{
MockHelper.UseMockAdapter(
@@ -24,7 +24,7 @@ public void MyTestInitialize()
/// <summary>
///A test for Find
///</summary>
- [TestMethod]
+ [Test]
public void FindByEmail_ShouldFindRecord()
{
dynamic user = Database.Default.Users.FindByEmail("foo");
@@ -36,7 +36,7 @@ public void FindByEmail_ShouldFindRecord()
/// <summary>
///A test for Find
///</summary>
- [TestMethod]
+ [Test]
public void FindById_ShouldFindRecord()
{
dynamic user = Database.Default.Users.FindById(1);
@@ -46,7 +46,7 @@ public void FindById_ShouldFindRecord()
/// <summary>
///A test for All
///</summary>
- [TestMethod]
+ [Test]
public void All_ShouldReturnTwoUsers()
{
IEnumerable<object> users = Database.Default.Users.All;
View
5 Simple.Data.Mocking/Ado/MockSchemaProvider.cs
@@ -104,5 +104,10 @@ public IEnumerable<ForeignKey> GetForeignKeys(Table table)
group.Select(row => row["UNIQUE_COLUMN_NAME"].ToString()));
}
}
+
+ public static void Reset()
+ {
+ Tables.Clear();
+ }
}
}
View
18 Simple.Data.SqlCe35Test/FindTests.cs
@@ -4,7 +4,7 @@
using System.Text;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using System.IO;
using Simple.Data.Ado;
using Simple.Data.SqlCe35;
@@ -14,21 +14,21 @@ namespace Simple.Data.SqlCeTest
/// <summary>
/// Summary description for FindTests
/// </summary>
- [TestClass]
+ [TestFixture]
public class FindTests
{
private static readonly string DatabasePath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Substring(8)),
"TestDatabase.sdf");
- [TestMethod]
+ [Test]
public void TestMethod1()
{
var provider = ProviderHelper.GetProviderByFilename(DatabasePath);
- Assert.IsInstanceOfType(provider, typeof (SqlCe35Provider));
+ Assert.IsInstanceOf(typeof (SqlCe35Provider), provider);
}
- [TestMethod]
+ [Test]
public void TestFindById()
{
var db = Database.OpenFile(DatabasePath);
@@ -36,7 +36,7 @@ public void TestFindById()
Assert.AreEqual(1, user.Id);
}
- [TestMethod]
+ [Test]
public void TestAllCount()
{
var db = Database.OpenFile(DatabasePath);
@@ -44,7 +44,7 @@ public void TestAllCount()
Assert.AreEqual(3, count);
}
- [TestMethod]
+ [Test]
public void TestImplicitCast()
{
var db = Database.OpenFile(DatabasePath);
@@ -52,7 +52,7 @@ public void TestImplicitCast()
Assert.AreEqual(1, user.Id);
}
- [TestMethod]
+ [Test]
public void TestImplicitEnumerableCast()
{
var db = Database.OpenFile(DatabasePath);
@@ -62,7 +62,7 @@ public void TestImplicitEnumerableCast()
}
}
- [TestMethod]
+ [Test]
public void TestInsert()
{
var db = Database.OpenFile(DatabasePath);
View
6 Simple.Data.SqlCe35Test/OrderDetailTests.cs
@@ -4,18 +4,18 @@
using System.Linq;
using System.Reflection;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.SqlCeTest
{
- [TestClass]
+ [TestFixture]
public class OrderDetailTests
{
private static readonly string DatabasePath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Substring(8)),
"TestDatabase.sdf");
- [TestMethod]
+ [Test]
public void TestOrderDetail()
{
var db = Database.OpenFile(DatabasePath);
View
18 Simple.Data.SqlCe35Test/SchemaTests/DatabaseSchemaTests.cs
@@ -4,13 +4,13 @@
using System.Linq;
using System.Reflection;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Ado;
using Simple.Data.Ado.Schema;
namespace Simple.Data.SqlCeTest.SchemaTests
{
- [TestClass]
+ [TestFixture]
public class DatabaseSchemaTests
{
private static readonly string DatabasePath = Path.Combine(
@@ -23,14 +23,14 @@ private static DatabaseSchema GetSchema()
return ((AdoAdapter)db.Adapter).GetSchema();
}
- [TestMethod]
+ [Test]
public void TestTables()
{
var schema = GetSchema();
Assert.AreEqual(1, schema.Tables.Count(t => t.ActualName == "Users"));
}
- [TestMethod]
+ [Test]
public void TestColumns()
{
var schema = GetSchema();
@@ -38,14 +38,14 @@ public void TestColumns()
Assert.AreEqual(1, table.Columns.Count(c => c.ActualName == "Id"));
}
- [TestMethod]
+ [Test]
public void TestPrimaryKey()
{
var schema = GetSchema();
Assert.AreEqual("CustomerId", schema.FindTable("Customers").PrimaryKey[0]);
}
- [TestMethod]
+ [Test]
[Ignore]
public void TestForeignKey()
{
@@ -57,21 +57,21 @@ public void TestForeignKey()
Assert.AreEqual("CustomerId", foreignKey.UniqueColumns[0]);
}
- [TestMethod]
+ [Test]
public void TestSingularResolution()
{
Assert.AreEqual("OrderItems",
GetSchema().FindTable("OrderItem").ActualName);
}
- [TestMethod]
+ [Test]
public void TestShoutySingularResolution()
{
Assert.AreEqual("OrderItems",
GetSchema().FindTable("ORDER_ITEM").ActualName);
}
- [TestMethod]
+ [Test]
public void TestShoutyPluralResolution()
{
Assert.AreEqual("OrderItems",
View
2  Simple.Data.SqlCe35Test/Simple.Data.SqlCe35Test.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
View
18 Simple.Data.SqlTest/FindTests.cs
@@ -1,6 +1,6 @@
using System.Data.SqlClient;
using System.Reflection;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using System.IO;
using Simple.Data.Ado;
@@ -9,17 +9,17 @@ namespace Simple.Data.SqlTest
/// <summary>
/// Summary description for FindTests
/// </summary>
- [TestClass]
+ [TestFixture]
public class FindTests
{
- [TestMethod]
+ [Test]
public void TestMethod1()
{
var provider = ProviderHelper.GetProviderByConnectionString("data source=.");
- Assert.IsInstanceOfType(provider, typeof(SqlConnectionProvider));
+ Assert.IsInstanceOf(typeof(SqlConnectionProvider), provider);
}
- [TestMethod]
+ [Test]
public void TestFindById()
{
var db = DatabaseHelper.Open();
@@ -27,7 +27,7 @@ public void TestFindById()
Assert.AreEqual(1, user.Id);
}
- [TestMethod]
+ [Test]
[Ignore] // This won't work until the database gets reset before every run.
public void TestAllCount()
{
@@ -36,7 +36,7 @@ public void TestAllCount()
Assert.AreEqual(3, count);
}
- [TestMethod]
+ [Test]
public void TestImplicitCast()
{
var db = DatabaseHelper.Open();
@@ -44,7 +44,7 @@ public void TestImplicitCast()
Assert.AreEqual(1, user.Id);
}
- [TestMethod]
+ [Test]
public void TestImplicitEnumerableCast()
{
var db = DatabaseHelper.Open();
@@ -54,7 +54,7 @@ public void TestImplicitEnumerableCast()
}
}
- [TestMethod]
+ [Test]
public void TestInsert()
{
var db = DatabaseHelper.Open();
View
6 Simple.Data.SqlTest/NaturalJoinTest.cs
@@ -2,14 +2,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.SqlTest
{
- [TestClass]
+ [TestFixture]
public class NaturalJoinTest
{
- [TestMethod]
+ [Test]
public void CustomerDotOrdersDotOrderDateShouldReturnOneRow()
{
var db = DatabaseHelper.Open();
View
6 Simple.Data.SqlTest/OrderDetailTests.cs
@@ -3,14 +3,14 @@
using System.IO;
using System.Linq;
using System.Reflection;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.SqlTest
{
- [TestClass]
+ [TestFixture]
public class OrderDetailTests
{
- [TestMethod]
+ [Test]
public void TestOrderDetail()
{
var db = DatabaseHelper.Open();
View
16 Simple.Data.SqlTest/SchemaTests/DatabaseSchemaTests.cs
@@ -1,13 +1,13 @@
using System.IO;
using System.Linq;
using System.Reflection;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Ado;
using Simple.Data.Ado.Schema;
namespace Simple.Data.SqlTest.SchemaTests
{
- [TestClass]
+ [TestFixture]
public class DatabaseSchemaTests
{
private static DatabaseSchema GetSchema()
@@ -16,14 +16,14 @@ private static DatabaseSchema GetSchema()
return ((AdoAdapter)db.Adapter).GetSchema();
}
- [TestMethod]
+ [Test]
public void TestTables()
{
var schema = GetSchema();
Assert.AreEqual(1, schema.Tables.Count(t => t.ActualName == "Users"));
}
- [TestMethod]
+ [Test]
public void TestColumns()
{
var schema = GetSchema();
@@ -32,7 +32,7 @@ public void TestColumns()
Assert.AreEqual(1, columns.Count(c => c.ActualName == "Id"));
}
- [TestMethod]
+ [Test]
public void TestPrimaryKey()
{
var schema = GetSchema();
@@ -41,7 +41,7 @@ public void TestPrimaryKey()
Assert.AreEqual("CustomerId", table.PrimaryKey[0]);
}
- [TestMethod]
+ [Test]
public void TestForeignKey()
{
var schema = GetSchema();
@@ -52,14 +52,14 @@ public void TestForeignKey()
Assert.AreEqual("CustomerId", fkey.UniqueColumns[0]);
}
- [TestMethod]
+ [Test]
public void TestIdentityIsTrueWhenItShouldBe()
{
var column = GetSchema().FindTable("Customers").FindColumn("CustomerId");
Assert.IsTrue(column.IsIdentity);
}
- [TestMethod]
+ [Test]
public void TestIdentityIsFalseWhenItShouldBe()
{
var column = GetSchema().FindTable("Customers").FindColumn("Name");
View
2  Simple.Data.SqlTest/Simple.Data.SqlTest.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
View
6 Simple.Data.UnitTest/DataRecordExtensionsTest.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
+using NUnit.Framework;
using Simple.Data;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Data;
@@ -12,13 +12,13 @@ namespace Simple.Data.UnitTest
///This is a test class for DataRecordExtensionsTest and is intended
///to contain all DataRecordExtensionsTest Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class DataRecordExtensionsTest
{
/// <summary>
///A test for ToDynamicRow
///</summary>
-// [TestMethod()]
+// [Test()]
public void ToDynamicRowTest()
{
var data = new Dictionary<string, object>
View
10 Simple.Data.UnitTest/DynamicRecordTest.cs
@@ -1,5 +1,5 @@
using Simple.Data;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using System;
using System.Collections.Generic;
@@ -11,13 +11,13 @@ namespace Simple.Data.UnitTest
///This is a test class for DynamicRecordTest and is intended
///to contain all DynamicRecordTest Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class DynamicRecordTest
{
/// <summary>
///A test for DynamicRecord Constructor
///</summary>
- [TestMethod()]
+ [Test()]
public void DynamicRecordDictionaryConstructorTest()
{
IDictionary<string, object> data = new Dictionary<string, object>
@@ -33,7 +33,7 @@ public void DynamicRecordDictionaryConstructorTest()
/// <summary>
///A test for DynamicRecord Constructor
///</summary>
- [TestMethod()]
+ [Test()]
public void DynamicRecordSetterTest()
{
dynamic target = new DynamicRecord();
@@ -41,7 +41,7 @@ public void DynamicRecordSetterTest()
Assert.AreEqual("Bob", target.Name);
}
- [TestMethod]
+ [Test]
public void DynamicCastTest()
{
dynamic target = new DynamicRecord();
View
26 Simple.Data.UnitTest/DynamicReferenceTest.cs
@@ -1,5 +1,5 @@
using Simple.Data;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using System;
namespace Simple.Data.UnitTest
@@ -10,10 +10,10 @@ namespace Simple.Data.UnitTest
///This is a test class for DynamicTableOrColumnTest and is intended
///to contain all DynamicTableOrColumnTest Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class DynamicReferenceTest
{
- [TestMethod]
+ [Test]
public void GetDynamicPropertyReturnsNewDynamicReferenceWithTableAndColumn()
{
// Arrange
@@ -27,7 +27,7 @@ public void GetDynamicPropertyReturnsNewDynamicReferenceWithTableAndColumn()
Assert.AreEqual("Table", column.Owner.Name);
}
- [TestMethod]
+ [Test]
public void GetDynamicPropertyDotPropertyReturnsNewDynamicReferenceWithTwoOwners()
{
// Arrange
@@ -45,7 +45,7 @@ public void GetDynamicPropertyDotPropertyReturnsNewDynamicReferenceWithTwoOwners
/// <summary>
///A test for GetAllObjectNames
///</summary>
- [TestMethod()]
+ [Test()]
public void GetAllObjectNamesTest()
{
// Arrange
@@ -61,7 +61,7 @@ public void GetAllObjectNamesTest()
Assert.AreEqual("Column", names[2]);
}
- [TestMethod]
+ [Test]
public void FromStringTest()
{
// Act
@@ -81,7 +81,7 @@ private static void DoAsserts<T>(SimpleExpression expression, DynamicReference c
Assert.AreEqual(expressionType, expression.Type);
}
- [TestMethod]
+ [Test]
public void EqualOperatorReturnsSimpleExpressionWithEqualType()
{
// Arrange
@@ -94,7 +94,7 @@ public void EqualOperatorReturnsSimpleExpressionWithEqualType()
DoAsserts(expression, column, 1, SimpleExpressionType.Equal);
}
- [TestMethod]
+ [Test]
public void EqualOperatorReturnsSimpleExpressionWithEqualTypeWhenUsedAsDynamic()
{
// Arrange
@@ -107,7 +107,7 @@ public void EqualOperatorReturnsSimpleExpressionWithEqualTypeWhenUsedAsDynamic()
DoAsserts(expression, column, 1, SimpleExpressionType.Equal);
}
- [TestMethod]
+ [Test]
public void NotEqualOperatorReturnsSimpleExpressionWithNotEqualType()
{
// Arrange
@@ -120,7 +120,7 @@ public void NotEqualOperatorReturnsSimpleExpressionWithNotEqualType()
DoAsserts(expression, column, 1, SimpleExpressionType.NotEqual);
}
- [TestMethod]
+ [Test]
public void LessThanOperatorReturnsSimpleExpressionWithLessThanType()
{
// Arrange
@@ -133,7 +133,7 @@ public void LessThanOperatorReturnsSimpleExpressionWithLessThanType()
DoAsserts(expression, column, 1, SimpleExpressionType.LessThan);
}
- [TestMethod]
+ [Test]
public void LessThanOrEqualOperatorReturnsSimpleExpressionWithLessThanOrEqualType()
{
// Arrange
@@ -146,7 +146,7 @@ public void LessThanOrEqualOperatorReturnsSimpleExpressionWithLessThanOrEqualTyp
DoAsserts(expression, column, 1, SimpleExpressionType.LessThanOrEqual);
}
- [TestMethod]
+ [Test]
public void GreaterThanOperatorReturnsSimpleExpressionWithGreaterThanType()
{
// Arrange
@@ -159,7 +159,7 @@ public void GreaterThanOperatorReturnsSimpleExpressionWithGreaterThanType()
DoAsserts(expression, column, 1, SimpleExpressionType.GreaterThan);
}
- [TestMethod]
+ [Test]
public void GreaterThanOrEqualOperatorReturnsSimpleExpressionWithGreaterThanOrEqualType()
{
// Arrange
View
6 Simple.Data.UnitTest/DynamicStringExtensionsTest.cs
@@ -2,15 +2,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using Simple.Data.Extensions;
namespace Simple.Data.UnitTest
{
- [TestClass]
+ [TestFixture]
public class DynamicStringExtensionsTest
{
- [TestMethod]
+ [Test]
public void PascalToSnakeTest()
{
var actual = "NameAndPostcode".ToSnakeCase();
View
6 Simple.Data.UnitTest/DynamicTableTest.cs
@@ -2,14 +2,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.UnitTest
{
- [TestClass]
+ [TestFixture]
public class DynamicTableTest
{
- [TestMethod]
+ [Test]
public void PropertyShouldReturnDynamicReference()
{
//Arrange
View
2  Simple.Data.UnitTest/ListHelper.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.UnitTest
{
View
18 Simple.Data.UnitTest/MethodNameParserTest.cs
@@ -1,5 +1,5 @@
-using Simple.Data;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
+using Simple.Data;
using System;
using System.Collections.Generic;
@@ -11,13 +11,13 @@ namespace Simple.Data.UnitTest
///This is a test class for MethodNameParserTest and is intended
///to contain all MethodNameParserTest Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class MethodNameParserTest
{
/// <summary>
///A test for GetColumns
///</summary>
- [TestMethod()]
+ [Test()]
public void GetColumnsTest()
{
const string methodName = "ThisAndThat";
@@ -29,7 +29,7 @@ public void GetColumnsTest()
/// <summary>
///A test for ParseFromMethodName
///</summary>
- [TestMethod()]
+ [Test()]
public void ParseFromMethodNameTest()
{
const string methodName = "FindByThisAndThat";
@@ -42,25 +42,25 @@ public void ParseFromMethodNameTest()
/// <summary>
///A test for RemoveCommandPart
///</summary>
- [TestMethod()]
+ [Test()]
public void RemoveCommandPartFindByTest()
{
RemoveCommandPartHelper("ThisAndThat", "FindByThisAndThat");
}
- [TestMethod()]
+ [Test()]
public void RemoveCommandPartFindAllByTest()
{
RemoveCommandPartHelper("ThisAndThat", "FindAllByThisAndThat");
}
- [TestMethod()]
+ [Test()]
public void RemoveCommandPartUpdateByTest()
{
RemoveCommandPartHelper("ThisAndThat", "UpdateByThisAndThat");
}
- [TestMethod()]
+ [Test()]
public void RemoveCommandPartDeleteByTest()
{
RemoveCommandPartHelper("ThisAndThat", "DeleteByThisAndThat");
View
3  Simple.Data.UnitTest/Simple.Data.UnitTest.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core">
@@ -42,7 +42,6 @@
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Data.SqlServerCe, Version=3.5.1.50, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
View
16 Simple.Data.UnitTest/SimpleExpressionTest.cs
@@ -2,15 +2,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
namespace Simple.Data.UnitTest
{
- [TestClass]
+ [TestFixture]
public class SimpleExpressionTest
{
// ReSharper disable InconsistentNaming
- [TestMethod]
+ [Test]
public void BitwiseAndOperatorCombinesTwoExpressions()
{
// Arrange
@@ -26,7 +26,7 @@ public void BitwiseAndOperatorCombinesTwoExpressions()
Assert.AreEqual(SimpleExpressionType.And, newExpr.Type);
}
- [TestMethod]
+ [Test]
public void BitwiseOrOperatorCombinesTwoExpressions()
{
// Arrange
@@ -42,7 +42,7 @@ public void BitwiseOrOperatorCombinesTwoExpressions()
Assert.AreEqual(SimpleExpressionType.Or, newExpr.Type);
}
- [TestMethod]
+ [Test]
public void CompoundOperatorsRespectParentheses_AndOrAnd()
{
// Arrange
@@ -67,7 +67,7 @@ public void CompoundOperatorsRespectParentheses_AndOrAnd()
}
- [TestMethod]
+ [Test]
public void CompoundExpressionsEvaluateAndOperatorsFirst()
{
// Arrange
@@ -113,7 +113,7 @@ private static void CompoundExpressionEvaluationOrderHelper(Func<SimpleExpressio
/// Checks the order in which expressions are combined.
/// Where the expression is A & B & C & D, the grouping should be (((A & B) & C) & D)
/// </summary>
- [TestMethod]
+ [Test]
public void CompoundExpressionsEvaluateRightToLeft_AndAndAnd()
{
CompoundExpressionEvaluationOrderHelper((e1,e2,e3,e4) => e1 & e2 & e3 & e4);
@@ -123,7 +123,7 @@ public void CompoundExpressionsEvaluateRightToLeft_AndAndAnd()
/// Checks the order in which expressions are combined.
/// Where the expression is A | B | C | D, the grouping should be (((A | B) | C) | D)
/// </summary>
- [TestMethod]
+ [Test]
public void CompoundExpressionsEvaluateRightToLeft_OrOrOr()
{
CompoundExpressionEvaluationOrderHelper((e1, e2, e3, e4) => e1 | e2 | e3 | e4);
View
34 Simple.Data.UnitTest/StringExtensionsTest.cs
@@ -1,5 +1,5 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
+using System;
+using NUnit.Framework;
using Simple.Data.Extensions;
namespace Simple.Data.UnitTest
@@ -10,13 +10,13 @@ namespace Simple.Data.UnitTest
///This is a test class for StringExtensionsTest and is intended
///to contain all StringExtensionsTest Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class StringExtensionsTest
{
/// <summary>
///A test for IsPlural
///</summary>
- [TestMethod]
+ [Test]
public void IsPluralLowercaseUsersShouldReturnTrue()
{
Assert.IsTrue("Users".IsPlural());
@@ -25,7 +25,7 @@ public void IsPluralLowercaseUsersShouldReturnTrue()
/// <summary>
///A test for IsPlural
///</summary>
- [TestMethod]
+ [Test]
public void IsPluralUppercaseUsersShouldReturnTrue()
{
Assert.IsTrue("USERS".IsPlural());
@@ -34,7 +34,7 @@ public void IsPluralUppercaseUsersShouldReturnTrue()
/// <summary>
///A test for IsPlural
///</summary>
- [TestMethod]
+ [Test]
public void IsPluralLowercaseUsersShouldReturnFalse()
{
Assert.IsFalse("User".IsPlural());
@@ -43,7 +43,7 @@ public void IsPluralLowercaseUsersShouldReturnFalse()
/// <summary>
///A test for IsPlural
///</summary>
- [TestMethod]
+ [Test]
public void IsPluralUppercaseUserShouldReturnFalse()
{
Assert.IsFalse("USER".IsPlural());
@@ -52,7 +52,7 @@ public void IsPluralUppercaseUserShouldReturnFalse()
/// <summary>
///A test for Pluralize
///</summary>
- [TestMethod()]
+ [Test()]
public void PluralizeUserShouldReturnUsers()
{
Assert.AreEqual("Users", "User".Pluralize());
@@ -61,7 +61,7 @@ public void PluralizeUserShouldReturnUsers()
/// <summary>
///A test for Pluralize
///</summary>
- [TestMethod()]
+ [Test()]
// ReSharper disable InconsistentNaming
public void PluralizeUSERShouldReturnUSERS()
// ReSharper restore InconsistentNaming
@@ -72,7 +72,7 @@ public void PluralizeUSERShouldReturnUSERS()
/// <summary>
///A test for Singularize
///</summary>
- [TestMethod()]
+ [Test()]
public void SingularizeUsersShouldReturnUser()
{
Assert.AreEqual("User", "Users".Singularize());
@@ -81,7 +81,7 @@ public void SingularizeUsersShouldReturnUser()
/// <summary>
///A test for Singularize
///</summary>
- [TestMethod()]
+ [Test()]
public void SingularizeUserShouldReturnUser()
{
Assert.AreEqual("User", "User".Singularize());
@@ -90,7 +90,7 @@ public void SingularizeUserShouldReturnUser()
/// <summary>
///A test for Singularize
///</summary>
- [TestMethod()]
+ [Test()]
// ReSharper disable InconsistentNaming
public void SingularizeUSERSShouldReturnUSER()
// ReSharper restore InconsistentNaming
@@ -101,7 +101,7 @@ public void SingularizeUSERSShouldReturnUSER()
/// <summary>
///A test for IsAllUpperCase
///</summary>
- [TestMethod()]
+ [Test()]
public void IsAllUpperCaseTrueTest()
{
Assert.IsTrue("USERS".IsAllUpperCase());
@@ -110,7 +110,7 @@ public void IsAllUpperCaseTrueTest()
/// <summary>
///A test for IsAllUpperCase
///</summary>
- [TestMethod()]
+ [Test()]
public void IsAllUpperCaseProperFalseTest()
{
Assert.IsFalse("Users".IsAllUpperCase());
@@ -119,7 +119,7 @@ public void IsAllUpperCaseProperFalseTest()
/// <summary>
///A test for IsAllUpperCase
///</summary>
- [TestMethod()]
+ [Test()]
public void IsAllUpperCasePascalFalseTest()
{
Assert.IsFalse("MoreUsers".IsAllUpperCase());
@@ -128,7 +128,7 @@ public void IsAllUpperCasePascalFalseTest()
/// <summary>
///A test for IsAllUpperCase
///</summary>
- [TestMethod()]
+ [Test()]
public void IsAllUpperCaseLowerFalseTest()
{
Assert.IsFalse("users".IsAllUpperCase());
@@ -137,7 +137,7 @@ public void IsAllUpperCaseLowerFalseTest()
/// <summary>
///A test for IsAllUpperCase
///</summary>
- [TestMethod()]
+ [Test()]
public void IsAllUpperCaseMixedFalseTest()
{
Assert.IsFalse("CUSTOMEr".IsAllUpperCase());
View
20 Simple.Data.UnitTest/TableCollectionTest.cs
@@ -1,5 +1,5 @@
using Simple.Data.Ado.Schema;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using NUnit.Framework;
using System;
namespace Simple.Data.UnitTest
@@ -10,13 +10,13 @@ namespace Simple.Data.UnitTest
///This is a test class for TableCollection and is intended
///to contain all TableCollection Unit Tests
///</summary>
- [TestClass()]
+ [TestFixture()]
public class TableCollectionTest
{
/// <summary>
///A test for Find
///</summary>
- [TestMethod()]
+ [Test()]
public void FindExactMatchTest()
{
Helper("Users", "Users");
@@ -25,7 +25,7 @@ public void FindExactMatchTest()
/// <summary>
///A test for Find
///</summary>
- [TestMethod()]
+ [Test()]
public void FindCaseInsensitiveMatchTest()
{
Helper("USERS", "Users");
@@ -34,7 +34,7 @@ public void FindCaseInsensitiveMatchTest()
/// <summary>
///A test for Find
///</summary>
- [TestMethod()]
+ [Test()]
public void FindPluralMatchTest()
{
Helper("Users", "User");
@@ -43,31 +43,31 @@ public void FindPluralMatchTest()
/// <summary>
///A test for Find
///</summary>
- [TestMethod()]
+ [Test()]
public void FindSingularMatchTest()
{
Helper("User", "Users");
}
- [TestMethod]
+ [Test]
public void FindSnakeFromCamel()
{
Helper("USER_PROFILE", "UserProfile");
}
- [TestMethod]
+ [Test]
public void FindSnakeFromPluralCamel()
{
Helper("USER_PROFILE", "UserProfiles");
}
- [TestMethod]
+ [Test]
public void FindCamelFromSnake()
{
Helper("UserProfile", "USER_PROFILE");
}
- [TestMethod]
+ [Test]
public void FindCamelFromPluralSnake()
{
Helper("UserProfiles", "USER_PROFILE");
Please sign in to comment.
Something went wrong with that request. Please try again.