Skip to content

Commit

Permalink
Remove unnecessary CreatedAt date assertions from comment, like, and …
Browse files Browse the repository at this point in the history
…post tests
  • Loading branch information
sentemon committed Dec 31, 2024
1 parent 008dfb0 commit 6e17e3a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public void Constructor_ShouldInitializeFieldsCorrectly()
var userId = Guid.NewGuid().ToString();
var username = "example";
var content = "Content";
var createdAt = DateTime.UtcNow;

// Act
var comment = new Comment(postId, userId, username, content);
Expand All @@ -24,7 +23,6 @@ public void Constructor_ShouldInitializeFieldsCorrectly()
comment.UserId.Should().Be(userId);
comment.Username.Should().Be(username);
comment.Content.Should().Be(content);
comment.CreatedAt.Date.Should().Be(createdAt.Date);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ public void Constructor_ShouldInitializeFieldsCorrectly()
// Arrange
var postId = Guid.NewGuid();
var userId = Guid.NewGuid().ToString();
var createdAt = DateTime.UtcNow;

// Act
var like = new Like(postId, userId);

// Assert
like.PostId.Should().Be(postId);
like.UserId.Should().Be(userId);
like.CreatedAt.Date.Should().Be(createdAt.Date);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public void CreateTextPost_ShouldInitializeFieldsCorrectly()
post.ContentType.Should().Be(ContentType.Text);
post.LikeCount.Should().Be(0);
post.CommentCount.Should().Be(0);
post.CreatedAt.Date.Should().Be(DateTime.UtcNow.Date);
}

[Fact]
Expand All @@ -49,7 +48,6 @@ public void CreateImagePost_ShouldInitializeFieldsCorrectly()
post.ContentType.Should().Be(ContentType.Image);
post.LikeCount.Should().Be(0);
post.CommentCount.Should().Be(0);
post.CreatedAt.Date.Should().Be(DateTime.UtcNow.Date);
}

[Fact]
Expand All @@ -72,7 +70,6 @@ public void CreateVideoPost_ShouldInitializeFieldsCorrectly()
post.ContentType.Should().Be(ContentType.Video);
post.LikeCount.Should().Be(0);
post.CommentCount.Should().Be(0);
post.CreatedAt.Date.Should().Be(DateTime.UtcNow.Date);
}

[Fact]
Expand Down

0 comments on commit 6e17e3a

Please sign in to comment.