package com.codeborne.selenide;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ConfigurationTest {
  @Before
  public void setUp() {
    System.setProperty("selenide.reportsUrl", "");
    System.setProperty("BUILD_URL", "");
  }

  @Test
  public void getsReportsUrlFromSystemProperty() {
    System.setProperty("selenide.reportsUrl", "http://ci.org/job/123/artifact/");
    assertEquals("http://ci.org/job/123/artifact/", Configuration.getReportsUrl());
  }

  @Test
  public void canConstructReportsUrlFromJenkinsProperty() {
    System.setProperty("BUILD_URL", "http://ci.org/job/123/");
    assertEquals("http://ci.org/job/123/artifact/", Configuration.getReportsUrl());
  }
}

@@ -26,16 +26,40 @@
 enide;%0A%0A
+import org.junit.After;%0A
 import o
@@ -757,11 +757,70 @@
 ());%0A  %7D
+%0A%0A  @After%0A  public void resetBuildUrl() %7B%0A    setUp();%0A  %7D
 %0A%7D%0A

reset build url after test