Java Code Examples for com.intuit.karate.FileUtils#getFileRelativeTo()

The following examples show how to use com.intuit.karate.FileUtils#getFileRelativeTo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HelloWorldRunner.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(MockServerTest.class, "_mock.feature");
    server = FeatureServer.start(file, 0, false, null);
    int port = server.getPort();
    System.setProperty("karate.server.port", port + "");
}
 
Example 2
Source File: Test01ParallelRunner.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(Test01Runner.class, "_mock.feature");
    FeatureServer server = FeatureServer.start(file, 0, false, null);
    System.setProperty("karate.env", "mock");
    System.setProperty("web.url.base", "http://localhost:" + server.getPort());
}
 
Example 3
Source File: Test01Runner.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(Test01Runner.class, "_mock.feature");
    FeatureServer server = FeatureServer.start(file, 0, false, null);
    System.setProperty("karate.env", "mock");
    System.setProperty("web.url.base", "http://localhost:" + server.getPort());
}
 
Example 4
Source File: ConsumerUsingMockTest.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    String queueName = "DEMO.MOCK";
    File file = FileUtils.getFileRelativeTo(ConsumerUsingMockTest.class, "payment-service-mock.feature");
    server = FeatureServer.start(file, 0, false, Collections.singletonMap("queueName", queueName));
    String paymentServiceUrl = "http://localhost:" + server.getPort();
    consumer = new Consumer(paymentServiceUrl, queueName);        
}
 
Example 5
Source File: DemoMockProceedRunner.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() throws Exception {
    int port = TestBase.startServer();
    Map map = new Match().def("demoServerPort", port).allAsMap();
    File file = FileUtils.getFileRelativeTo(DemoMockProceedRunner.class, "demo-mock-proceed.feature");
    server = FeatureServer.start(file, 0, false, map);
}
 
Example 6
Source File: DownloadRunner.java    From karate with MIT License 5 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(MockServerTest.class, "_mock.feature");
    server = FeatureServer.start(file, 0, false, null);
    int port = server.getPort();
    System.setProperty("karate.server.port", port + "");
}
 
Example 7
Source File: BackofficeRppTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeRppTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 8
Source File: BackofficeIntermediariTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeIntermediariTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 9
Source File: BackofficeEntrateTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeEntrateTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 10
Source File: BackofficeRuoliTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeRuoliTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 11
Source File: PagamentoRppTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(PagamentoRppTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 12
Source File: JavaHttpTest.java    From karate with MIT License 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(JavaHttpTest.class, "server.feature");
    server = FeatureServer.start(file, 0, false, null);
}
 
Example 13
Source File: PendenzaProfiloTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(PendenzaProfiloTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 14
Source File: PendenzaProfiloTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(PendenzaProfiloTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 15
Source File: BackofficeTipipendenzaTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeTipipendenzaTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 16
Source File: BackofficeFlussiRendicontazioneTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeFlussiRendicontazioneTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 17
Source File: BackofficeApplicazioniTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(BackofficeApplicazioniTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 18
Source File: MockRunner.java    From karate with MIT License 4 votes vote down vote up
@Test
public void testStart() {    
    File file = FileUtils.getFileRelativeTo(MockRunner.class, "mock.feature");
    FeatureServer server = FeatureServer.start(file, 8080, false, null);    
    server.waitSync();        
}
 
Example 19
Source File: PagamentoProfiloTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(PagamentoProfiloTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}
 
Example 20
Source File: PagamentoAvvisiTest.java    From govpay with GNU General Public License v3.0 4 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    File file = FileUtils.getFileRelativeTo(PagamentoAvvisiTest.class, "../../../../../utils/mock-ente.feature");
    mockservice = FeatureServer.start(file, 8888, false, null);
}