mirror of https://github.com/abpframework/abp.git
7 changed files with 35 additions and 5 deletions
@ -1,8 +1,10 @@ |
|||||
using Volo.Blogging.Blogs; |
using Volo.Blogging.Blogs; |
||||
using Volo.Blogging.MongoDB; |
using Volo.Blogging.MongoDB; |
||||
|
using Xunit; |
||||
|
|
||||
namespace Volo.Blogging |
namespace Volo.Blogging |
||||
{ |
{ |
||||
|
[Collection(MongoTestCollection.Name)] |
||||
public class BlogRepository_Tests : BlogRepository_Tests<BloggingMongoDbTestModule> |
public class BlogRepository_Tests : BlogRepository_Tests<BloggingMongoDbTestModule> |
||||
{ |
{ |
||||
} |
} |
||||
|
|||||
@ -1,8 +1,10 @@ |
|||||
using Volo.Blogging.Comments; |
using Volo.Blogging.Comments; |
||||
using Volo.Blogging.MongoDB; |
using Volo.Blogging.MongoDB; |
||||
|
using Xunit; |
||||
|
|
||||
namespace Volo.Blogging |
namespace Volo.Blogging |
||||
{ |
{ |
||||
|
[Collection(MongoTestCollection.Name)] |
||||
public class CommentRepository_Tests : CommentRepository_Tests<BloggingMongoDbTestModule> |
public class CommentRepository_Tests : CommentRepository_Tests<BloggingMongoDbTestModule> |
||||
{ |
{ |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,16 @@ |
|||||
|
using System; |
||||
|
using Mongo2Go; |
||||
|
|
||||
|
namespace Volo.Blogging.MongoDB |
||||
|
{ |
||||
|
public class MongoDbFixture : IDisposable |
||||
|
{ |
||||
|
private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); |
||||
|
public static readonly string ConnectionString = MongoDbRunner.ConnectionString; |
||||
|
|
||||
|
public void Dispose() |
||||
|
{ |
||||
|
MongoDbRunner?.Dispose(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
using Xunit; |
||||
|
|
||||
|
namespace Volo.Blogging.MongoDB |
||||
|
{ |
||||
|
[CollectionDefinition(Name)] |
||||
|
public class MongoTestCollection : ICollectionFixture<MongoDbFixture> |
||||
|
{ |
||||
|
public const string Name = "MongoDB Collection"; |
||||
|
} |
||||
|
} |
||||
@ -1,8 +1,10 @@ |
|||||
using Volo.Blogging.Posts; |
using Volo.Blogging.Posts; |
||||
using Volo.Blogging.MongoDB; |
using Volo.Blogging.MongoDB; |
||||
|
using Xunit; |
||||
|
|
||||
namespace Volo.Blogging |
namespace Volo.Blogging |
||||
{ |
{ |
||||
|
[Collection(MongoTestCollection.Name)] |
||||
public class PostRepository_Tests : PostRepository_Tests<BloggingMongoDbTestModule> |
public class PostRepository_Tests : PostRepository_Tests<BloggingMongoDbTestModule> |
||||
{ |
{ |
||||
} |
} |
||||
|
|||||
@ -1,8 +1,10 @@ |
|||||
using Volo.Blogging.Tagging; |
using Volo.Blogging.Tagging; |
||||
using Volo.Blogging.MongoDB; |
using Volo.Blogging.MongoDB; |
||||
|
using Xunit; |
||||
|
|
||||
namespace Volo.Blogging |
namespace Volo.Blogging |
||||
{ |
{ |
||||
|
[Collection(MongoTestCollection.Name)] |
||||
public class TagRepository_Tests : TagRepository_Tests<BloggingMongoDbTestModule> |
public class TagRepository_Tests : TagRepository_Tests<BloggingMongoDbTestModule> |
||||
{ |
{ |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue