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

        // Act
        int result = await sut.ExecuteNoIfStatement();

        // Assert
        Assert.Equal(3, result);
    }
Ejemplo n.º 2
0
    public async Task ExecuteReproduction_HasUncoveredLine()
    {
        // Arrange
        var sut = new AwaitUsingReturnInIfStatementReproduction();

        // Act
        int resultTrue = await sut.ExecuteReproduction(true);

        int resultFalse = await sut.ExecuteReproduction(false);

        // Assert
        Assert.Equal(3, resultTrue);
        Assert.Equal(1, resultFalse);
    }
Ejemplo n.º 3
0
    public async Task ExecuteUsingWithoutAwait_AllCovered()
    {
        // Arrange
        var sut = new AwaitUsingReturnInIfStatementReproduction();

        // Act
        int resultTrue = await sut.ExecuteUsingWithoutAwait(true);

        int resultFalse = await sut.ExecuteUsingWithoutAwait(false);

        // Assert
        Assert.Equal(3, resultTrue);
        Assert.Equal(1, resultFalse);
    }