package org.sonar.plugins.stash.coverage;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class CoverageSensorTest {
    public static String formatIssueMessage(String path, double coverage, double previousCoverage) {
        // make this available to all our tests
        return CoverageSensor.formatIssueMessage(path, coverage, previousCoverage);
    }

    @Test
    public void testRoundedFormatting() {
        assertEquals(
                CoverageSensorTest.formatIssueMessage("path/code/coverage", 7.65, 50.29),
                "Line coverage of file path/code/coverage lowered from 50.3% to 7.7%."
        );

    }
}

@@ -474,168 +474,168 @@
     
-CoverageSensorTest.formatIssueMessage(%22path/code/coverage%22, 7.65, 50.29),%0A                %22Line coverage of file path/code/coverage lowered from 50.3%25 to 7.7%25.%22
+%22Line coverage of file path/code/coverage lowered from 50.3%25 to 7.7%25.%22,%0A                CoverageSensorTest.formatIssueMessage(%22path/code/coverage%22, 7.65, 50.29)
 %0A   

fix order of assert() arguments