public async Task Should_fail_if_name_is_empty() { var mock = CreateRepository("name1", "name2"); var target = new TaskValidator(mock); var result = await target.ValidateAsync(new Entities.Task { Name = "" }); Assert.False(result); }
public async Task Should_pass_if_name_is_unique() { var mock = CreateRepository("name1", "name2"); var target = new TaskValidator(mock); var result = await target.ValidateAsync(new Entities.Task { Name = "name3" }); Assert.True(result); }