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 634 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.DatabaseName);
  14. var collections = Database.ListCollectionNames()?.ToList();
  15. collections.Should().Contain(MongoDBOptions.PublishedCollection);
  16. collections.Should().Contain(MongoDBOptions.ReceivedCollection);
  17. }
  18. }
  19. }