public void MapGoalModelToGoal_WhenGoalEmpty_ShouldReturnEmpty( GoalMapper sut) { // Act var result = sut.Map(new GoalModel()); // Asserts result.Should().BeOfType <Goal>(); result.Title.Should().BeNull(); result.Count.Should().Be(default);
public void MapGoalListToGoalModelList_WhenListNull_ShouldReturnEmpty( GoalMapper sut) { // Arrange List <Goal> goals = null; // Act var result = sut.Map(goals); // Assert result.Should().BeEmpty(); }
public void MapGoalModelToGoal_ShouldMapCorrectly( GoalModel goalModel, GoalMapper sut) { // Act var result = sut.Map(goalModel); // Asserts result.Should().BeOfType <Goal>(); result.Should().BeEquivalentTo(goalModel, opt => opt.Excluding(src => src.Id)); }
public void MapGoalListToGoalModelList_WhenListFilled_ShouldMapCorrectly( List <Goal> goals, GoalMapper sut) { // Act var result = sut.Map(goals); // Assert result.Should().NotBeNullOrEmpty(); result.Should().BeOfType <List <GoalModel> >(); result.Should().BeEquivalentTo(goals, opt => opt.Excluding(src => src.Id)); }