public void GetError_ShouldReturnCorrectValue( SampleValidable sut) { //arrange //act var actual = sut.GetError("Property"); //assert actual.Should().Be(NoError.Value); }
public async Task GetError_WithValidatedPropertyWithNoError_ShouldReturnCorrectValue( [Frozen] Mock <IValidator> validator, SampleValidable sut, string value) { //arrange validator.Setup(v => v.Validate(value, "Property", It.IsAny <CancellationToken>())) .ReturnsTask(NoError.Value); //act await sut.SetValueAsyncPublic(value, "Property", new CancellationTokenSource()); var actual = sut.GetError("Property"); //assert actual.Should().Be(NoError.Value); }