This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package stepDefinitions; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.Assert; | |
import io.cucumber.java.en.Given; | |
import io.cucumber.java.en.Then; | |
import io.cucumber.java.en.When; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Wikipedia search | |
Scenario: Search with title | |
Given User is at home page | |
When User searched for a title "iPhone" | |
Then User found the page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cucumberOptions; | |
import io.cucumber.testng.AbstractTestNGCucumberTests; | |
import io.cucumber.testng.CucumberOptions; | |
@CucumberOptions(features="src/test/java/features", glue="stepDefinitions", monochrome=true) | |
public class TestNGRunner extends AbstractTestNGCucumberTests { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import org.bouncycastle.openssl.jcajce.JcaPEMWriter; | |
import org.bouncycastle.util.io.pem.PemObject; | |
import java.io.*; | |
import java.security.Key; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.StandardOpenOption; | |
import static java.util.UUID.randomUUID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
public class Main { | |
public static void main(String[] args) { | |
String content = "hello world"; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class Main { | |
public static void main(String[] args) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import java.util.concurrent.TimeUnit; | |
@Configuration | |
public class CacheStoreBeans { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import com.google.common.cache.Cache; | |
import com.google.common.cache.CacheBuilder; | |
import java.util.concurrent.TimeUnit; | |
public class CacheStore<T> { | |
private Cache<String, T> cache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import org.springframework.stereotype.Service; | |
@Service | |
public class BookService { | |
public Book getBookById(String id){ | |
try{ | |
// simulate slow retrieval from DB | |
Thread.sleep(2000); |
NewerOlder