Skip to content

Commit

Permalink
Unit test categorization
Browse files Browse the repository at this point in the history
  • Loading branch information
thepirat000 committed Dec 16, 2023
1 parent 390ca0b commit 47a284b
Show file tree
Hide file tree
Showing 34 changed files with 102 additions and 50 deletions.
6 changes: 4 additions & 2 deletions test/Audit.AmazonQLDB.UnitTest/AmazonQLDBTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
namespace Audit.IntegrationTest
{
[TestFixture]
[Category("Integration-AmazonQLDB")]
[Category("Integration")]
[Category("AmazonQLDB")]
public class AmazonQLDBTests
{
private AmazonQldbDataProvider GetAmazonQLDBDataProvider(List<AuditEvent> ins, List<AuditEvent> repl) =>
Expand All @@ -27,7 +28,8 @@ private AmazonQldbDataProvider GetAmazonQLDBDataProvider(List<AuditEvent> ins, L
};

[Test]
[Category("Integration-AmazonQLDB")]
[Category("Integration")]
[Category("AmazonQLDB")]
public void Test_AmazonQLDB_HappyPath()
{
var ins = new List<AuditEvent>();
Expand Down
12 changes: 8 additions & 4 deletions test/Audit.AzureCosmos.UnitTest/AzureCosmosTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace Audit.AzureCosmos.UnitTest
public class AzureCosmosTests
{
[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void TestAzureCosmos_CustomId()
{
var id = Guid.NewGuid().ToString().Replace("-", "").ToUpper();
Expand Down Expand Up @@ -45,7 +46,8 @@ public void TestAzureCosmos_CustomId()
}

[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public async Task TestAzureCosmos_CustomIdAsync()
{
var id = Guid.NewGuid().ToString().Replace("-", "").ToUpper();
Expand Down Expand Up @@ -81,7 +83,8 @@ public async Task TestAzureCosmos_CustomIdAsync()

#if IS_DOCDB
[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void TestAzureCosmos_Query()
{
var dp = new AzureCosmos.Providers.AzureCosmosDataProvider()
Expand Down Expand Up @@ -125,7 +128,8 @@ public void TestAzureCosmos_Query()
}

[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void TestAzureCosmos_Enumerate()
{
var dp = new AzureCosmos.Providers.AzureCosmosDataProvider()
Expand Down
12 changes: 8 additions & 4 deletions test/Audit.AzureStorageBlobs.UnitTest/AzureStorageBlobsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace Audit.IntegrationTest
public class AzureStorageBlobsTests
{
[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void Test_AzureStorageBlobs_HappyPath()
{
var id = Guid.NewGuid().ToString();
Expand Down Expand Up @@ -44,7 +45,8 @@ public void Test_AzureStorageBlobs_HappyPath()
}

[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public async Task Test_AzureStorageBlobs_HappyPathAsync()
{
var id = Guid.NewGuid().ToString();
Expand Down Expand Up @@ -78,7 +80,8 @@ public async Task Test_AzureStorageBlobs_HappyPathAsync()
}

[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void Test_AzureStorageBlobs_ConnectionString()
{
var id = Guid.NewGuid().ToString();
Expand Down Expand Up @@ -112,7 +115,8 @@ public void Test_AzureStorageBlobs_ConnectionString()
}

[Test]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public void Test_AzureStorageBlobs_Credential()
{
var id = Guid.NewGuid().ToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
namespace Audit.AzureStorageTables.UnitTest
{
[TestFixture]
[Category("Integration-Azure")]
[Category("Integration")]
[Category("Azure")]
public class AzureTableDataProviderIntegrationTests
{
#region Sync
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.DynamoDB.UnitTest/DynamoDbTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ namespace Audit.DynamoDB.UnitTest
public class DynamoDbTests
{
[Test]
[Category("Integration-Dynamo")]
[Category("Integration")]
[Category("Dynamo")]
public void TestStressDynamo()
{
int N = 32;
Expand Down
12 changes: 8 additions & 4 deletions test/Audit.Elasticsearch.UnitTest/ElasticsearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public void Test_ElasticSearchDataProvider_FluentApi()
}

[Test]
[Category("Integration-Elasticsearch")]
[Category("Integration")]
[Category("Elasticsearch")]
public void Test_Elasticsearch_HappyPath()
{
var ins = new List<Core.AuditEvent>();
Expand Down Expand Up @@ -85,7 +86,8 @@ public void Test_Elasticsearch_HappyPath()
}

[Test]
[Category("Integration-Elasticsearch")]
[Category("Integration")]
[Category("Elasticsearch")]
public async Task Test_Elasticsearch_HappyPath_Async()
{
var ins = new List<Core.AuditEvent>();
Expand Down Expand Up @@ -136,7 +138,8 @@ public async Task Test_Elasticsearch_HappyPath_Async()
}

[Test]
[Category("Integration-Elasticsearch")]
[Category("Integration")]
[Category("Elasticsearch")]
public void Test_Elasticsearch_AutoGeneratedId()
{
var ins = new List<Core.AuditEvent>();
Expand Down Expand Up @@ -183,7 +186,8 @@ public void Test_Elasticsearch_AutoGeneratedId()
}

[Test]
[Category("Integration-Elasticsearch")]
[Category("Integration")]
[Category("Elasticsearch")]
public async Task Test_Elasticsearch_AutoGeneratedId_Async()
{
var ins = new List<Core.AuditEvent>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class DbCommandInterceptorTests
{
private static Random _rnd = new Random();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class DbTransactionInterceptorTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfChangeTrackerTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfCoreInMemoryTests
{
private static readonly Random Rnd = new Random();
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Core.UnitTest/EfCoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfCoreTests
{
[OneTimeSetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfEarlySavingTests
{
class Message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
namespace Audit.EntityFramework.Core.UnitTest.Context
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EntityFrameworkTests_Core
{
[OneTimeSetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Core.UnitTest/InheritanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class InheritanceTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class SaveChangesDisposalTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
namespace Audit.EntityFramework.Core.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class SaveChangesInterceptorTests
{
[SetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Full.UnitTest/ComplexTypeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class ComplexTypeTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfChangeTrackerTests
{
[SetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Full.UnitTest/EfTestsCodeFirst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class EfTestsCodeFirst
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class InheritanceMultipleMappingTests
{
[SetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Full.UnitTest/InheritanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class InheritanceTests
{
[SetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.EntityFramework.Full.UnitTest/SaveChangesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
namespace Audit.EntityFramework.Full.UnitTest
{
[TestFixture]
[Category("Integration-SqlServer")]
[Category("Integration")]
[Category("SqlServer")]
public class SaveChangesTests
{
[SetUp]
Expand Down
12 changes: 8 additions & 4 deletions test/Audit.Kafka.UnitTest/KafkaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public void Test_KafkaDataProvider_FluentApi()


[Test]
[Category("Integration-Kafka")]
[Category("Integration")]
[Category("Kafka")]
public async Task Test_KafkaDataProvider_Stress()
{
var locker = new object();
Expand Down Expand Up @@ -80,7 +81,8 @@ public async Task Test_KafkaDataProvider_Stress()


[Test]
[Category("Integration-Kafka")]
[Category("Integration")]
[Category("Kafka")]
public async Task Test_KafkaDataProvider_HappyPath_Async()
{
var reports = new List<DeliveryResult<Null, AuditEvent>>();
Expand Down Expand Up @@ -131,7 +133,8 @@ public async Task Test_KafkaDataProvider_HappyPath_Async()
}

[Test]
[Category("Integration-Kafka")]
[Category("Integration")]
[Category("Kafka")]
public void Test_KafkaDataProvider_HappyPath()
{
var reports = new List<DeliveryResult<Null, AuditEvent>>();
Expand Down Expand Up @@ -185,7 +188,8 @@ public void Test_KafkaDataProvider_HappyPath()
}

[Test]
[Category("Integration-Kafka")]
[Category("Integration")]
[Category("Kafka")]
public void Test_KafkaDataProvider_KeyedHappyPath()
{
var reports = new List<DeliveryResult<string, AuditEvent>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
namespace Audit.MongoClient.UnitTest
{
[TestFixture]
[Category("Integration-Mongo")]
[Category("Integration")]
[Category("Mongo")]
public class AuditMongoClientIntegrationTests
{
[SetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.MongoDB.UnitTest/MongoDbTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
namespace Audit.MongoDb.UnitTest
{
[TestFixture]
[Category("Integration-Mongo")]
[Category("Integration")]
[Category("Mongo")]
public class MongoDbTests
{
[OneTimeSetUp]
Expand Down
3 changes: 2 additions & 1 deletion test/Audit.MySql.UnitTest/MySqlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public void Test_MySqlDataProvider_FluentApi()
}

[Test]
[Category("Integration-MySql")]
[Category("Integration")]
[Category("MySql")]
public void Test_MySqlDataProvider_Insert()
{
Audit.Core.Configuration.Setup()
Expand Down
Loading

0 comments on commit 47a284b

Please sign in to comment.