You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MongoDBStorageTest.cs 652 B

123456789101112131415161718192021
  1. using FluentAssertions;
  2. using MongoDB.Driver;
  3. using Xunit;
  4. namespace DotNetCore.CAP.MongoDB.Test
  5. {
  6. [Collection("MongoDB")]
  7. public class MongoDBStorageTest : DatabaseTestHost
  8. {
  9. [Fact]
  10. public void InitializeAsync_Test()
  11. {
  12. var names = MongoClient.ListDatabaseNames()?.ToList();
  13. names.Should().Contain(MongoDBOptions.Value.DatabaseName);
  14. var collections = Database.ListCollectionNames()?.ToList();
  15. collections.Should().Contain(MongoDBOptions.Value.PublishedCollection);
  16. collections.Should().Contain(MongoDBOptions.Value.ReceivedCollection);
  17. }
  18. }
  19. }