diff options
| author | Danail Dimitrov <danaildimitrov321@gmail.com> | 2021-01-28 21:25:56 +0200 |
|---|---|---|
| committer | Danail Dimitrov <danaildimitrov321@gmail.com> | 2021-01-28 21:25:56 +0200 |
| commit | 6b11b2001a227a09387548853071c63b6fe5c991 (patch) | |
| tree | 6d9fefe09b31976ac91ea544ee4eb36fc041d8b5 /src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs | |
| parent | 702e947c20cbdc2c5aaacfa0e8172bfc97912dd2 (diff) | |
| download | DevHive-6b11b2001a227a09387548853071c63b6fe5c991.tar DevHive-6b11b2001a227a09387548853071c63b6fe5c991.tar.gz DevHive-6b11b2001a227a09387548853071c63b6fe5c991.zip | |
Refactored tests after the boys broke them
Diffstat (limited to 'src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs')
| -rw-r--r-- | src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs b/src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs index 2a8bb1f..9cbb43b 100644 --- a/src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs +++ b/src/DevHive.Tests/DevHive.Data.Tests/CommentRepository.Tests.cs @@ -41,7 +41,7 @@ namespace DevHive.Data.Tests { Comment comment = await this.AddEntity(); - Comment resultComment = await this.CommentRepository.GetCommentByIssuerAndTimeCreatedAsync(comment.CreatorId, comment.TimeCreated); + Comment resultComment = await this.CommentRepository.GetCommentByIssuerAndTimeCreatedAsync(comment.Creator.Id, comment.TimeCreated); Assert.AreEqual(comment.Id, resultComment.Id, "GetCommentByIssuerAndTimeCreatedAsync does not return the corect comment when it exists"); } @@ -81,10 +81,11 @@ namespace DevHive.Data.Tests #region HelperMethods private async Task<Comment> AddEntity(string name = COMMENT_MESSAGE) { + User creator = new User { Id = Guid.NewGuid() }; Comment comment = new Comment { Message = COMMENT_MESSAGE, - CreatorId = Guid.NewGuid(), + Creator = creator, TimeCreated = DateTime.Now }; |
