public void GivenNullDescription_CreatingGoal_ShouldThrowArgumentException() { var goal = new GoalBuilder().WithDescription(null) .Create(); Assert.NotNull(goal); Assert.Null(goal.Description); }
public void GivenEmptyDescription_CreatingGoal_ShouldCreateTheGoal() { var goal = new GoalBuilder().WithDescription(string.Empty) .Create(); Assert.NotNull(goal); Assert.Equal(expected: string.Empty, actual: goal.Description); }
public void GivenValidInput_CreatingGoal_ShouldCreateGoal() { var title = "Title"; var description = "Description"; var createdBy = Guid.NewGuid(); var goal = new GoalBuilder().WithTitle(title) .WithDescription(description) .WithCreatedBy(createdBy) .Create(); Assert.NotNull(goal); Assert.NotEqual(expected: Guid.Empty, actual: goal.Id); Assert.Equal(expected: title, actual: goal.Title); Assert.Equal(expected: description, actual: goal.Description); Assert.Equal(expected: createdBy, actual: goal.CreatedBy); Assert.NotEqual(expected: DateTimeOffset.MinValue, actual: goal.CreatedOn); }