aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2021-01-28 21:25:56 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2021-01-28 21:25:56 +0200
commit6b11b2001a227a09387548853071c63b6fe5c991 (patch)
tree6d9fefe09b31976ac91ea544ee4eb36fc041d8b5 /src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs
parent702e947c20cbdc2c5aaacfa0e8172bfc97912dd2 (diff)
downloadDevHive-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/FeedRepository.Tests.cs')
-rw-r--r--src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs b/src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs
index e38b31c..62d6455 100644
--- a/src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs
+++ b/src/DevHive.Tests/DevHive.Data.Tests/FeedRepository.Tests.cs
@@ -44,8 +44,8 @@ namespace DevHive.Data.Tests
DateTime dateTime = new DateTime(3000, 05, 09, 9, 15, 0);
- Post dummyPost = this.CreateDummyPost(dummyUser.Id);
- Post anotherDummnyPost = this.CreateDummyPost(dummyUser.Id);
+ Post dummyPost = this.CreateDummyPost(dummyUser);
+ Post anotherDummnyPost = this.CreateDummyPost(dummyUser);
const int PAGE_NUMBER = 1;
const int PAGE_SIZE = 10;
@@ -96,16 +96,15 @@ namespace DevHive.Data.Tests
};
}
- private Post CreateDummyPost(Guid posterId)
+ private Post CreateDummyPost(User poster)
{
const string POST_MESSAGE = "random message";
Guid id = Guid.NewGuid();
-
Post post = new Post
{
Id = id,
Message = POST_MESSAGE,
- CreatorId = posterId
+ Creator = poster
};
this.Context.Posts.Add(post);