public static IMongoCollection <TSaga> GetCollection <TSaga>(this IMongoDatabase database, ICollectionNameFormatter collectionNameFormatter) where TSaga : class, ISaga => database.GetCollection <TSaga>(collectionNameFormatter.Saga <TSaga>());
public void Should_return_correct_collection() { var collectionName = _collectionNameFormatter.Saga <SimpleSaga>(); Assert.AreEqual("simple.sagas", collectionName); }