package com.saucelabs.common;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class SauceJavaScriptStringsTest {
    private SauceHelper sauceHelper;

    @Test
    public void shouldReturnCorrectCommandForTrueResult()
    {
        sauceHelper = new SauceHelper();
        Boolean testStatus = true;
        String actualTestResultCommand = sauceHelper.getTestResultString(testStatus);

        assertEquals("sauce:job-result=true", actualTestResultCommand);
    }

    @Test
    public void shouldReturnCorrectCommandForFalseResult()
    {
        sauceHelper = new SauceHelper();
        Boolean testStatus = false;

        String actualTestResultCommand = sauceHelper.getTestResultString(testStatus);
        assertEquals("sauce:job-result=false", actualTestResultCommand);
    }
    @Test
    public void shouldBeCorrectTestNamePrefix()
    {
        assertEquals("sauce:job-name=", SauceJavaScriptStrings.testNamePrefix);
    }
    @Test
    public void shouldBeCorrectSauceContextPrefix()
    {
        assertEquals("sauce:context=", SauceJavaScriptStrings.sauceContextPrefix);
    }
    @Test
    public void shouldBeCorrectTagsPrefix()
    {
        assertEquals("sauce:job-tags=", SauceJavaScriptStrings.tagsPrefix);
    }
    @Test
    public void shouldBeCorrectBuildPrefix()
    {
        assertEquals("sauce:job-build=", SauceJavaScriptStrings.buildPrefix);
    }
    @Test
    public void shouldBeCorrectBreakStatement()
    {
        assertEquals("sauce: break", SauceJavaScriptStrings.breakStatement);
    }
}

@@ -1548,11 +1548,169 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void itShouldBeCorrectJobResultPrefix()%0A    %7B%0A        assertEquals(%22sauce:job-result=%22, SauceJavaScriptStrings.testStatusPrefix);%0A    %7D
 %0A%7D%0A

add one more test for test status prefix