Skip to content

PostPageVmImplTests

Namespace: SlottyMedia.Tests.Viewmodel

Unit tests for the PostPageVmImpl class.

public class PostPageVmImplTests

Inheritance ObjectPostPageVmImplTests

Constructors

PostPageVmImplTests()

public PostPageVmImplTests()

Methods

SetUp()

Sets up the test environment by initializing mocks and the PostPageVmImpl instance.

public void SetUp()

Initialize_SetsPostAndLoadsFirstCommentsPage()

Tests that Initialize method sets the Post and loads the first page of comments.

public Task Initialize_SetsPostAndLoadsFirstCommentsPage()

Returns

Task

Initialize_SetsPostToNullWhenPostNotFound()

Tests that Initialize method sets the Post property to null when the post is not found.

public Task Initialize_SetsPostToNullWhenPostNotFound()

Returns

Task

LoadCommentsPage_AddsCommentsToList()

Tests that LoadCommentsPage method adds comments to the Comments list.

public Task LoadCommentsPage_AddsCommentsToList()

Returns

Task

LoadCommentsPage_DoesNotLoadWhenPostIsNull()

Tests that LoadCommentsPage method does not load comments when the Post property is null.

public Task LoadCommentsPage_DoesNotLoadWhenPostIsNull()

Returns

Task