Ejemplo n.º 1
0
    public async Task Execute_ShouldWork_NoException()
    {
        // Arrange
        var sut = new AsyncThrowReproduction();

        // Act
        await sut.Execute(false);
    }
Ejemplo n.º 2
0
    public async Task Execute_ShouldWork_Exception()
    {
        // Arrange
        var sut = new AsyncThrowReproduction();

        // Act
        async Task TestFunc() => await sut.Execute(true);

        // Assert
        await Assert.ThrowsAsync <InvalidOperationException>(TestFunc);
    }