@@ -0,0 +1,1019 @@
+package com.damienfremont.blog;%0A%0Aimport static org.assertj.core.api.StrictAssertions.assertThat;%0A%0Aimport org.junit.runner.RunWith;%0A%0Aimport cucumber.api.CucumberOptions;%0Aimport cucumber.api.java8.En;%0Aimport cucumber.api.junit.Cucumber;%0A%0A@RunWith(Cucumber.class)%0A@CucumberOptions(strict = true, features = %22features%22)%0Apublic class D_CucumberJava8Test implements En %7B%0A%09%0A%09ClassToTest classToTest;%0A%09String receipt;%0A%09String refund;%0A%0A%09public D_CucumberJava8Test() %7B%0A%09%09%0A%09%09Before(()-%3E%7B%0A%09%09%09classToTest = new ClassToTest();%0A%09%09%7D);%0A%09%09%0A%09%09Given(%22%5EJeff has bought a microwave for %5C%5C$(%5C%5Cd+) - D$%22, (Integer amount) -%3E %7B%0A%09%09%09receipt = classToTest.buy(%22microwave%22, amount);%0A%09%09%7D);%0A%0A%09%09Given(%22%5Ehe has a receipt - D$%22, () -%3E %7B%0A%09%09%09assertThat(receipt)%0A%09%09%09%09.isNotNull();%0A%09%09%7D);%0A%0A%09%09When(%22%5Ehe returns the microwave - D$%22, () -%3E %7B%0A%09%09%09refund = classToTest.returns(%22microwave%22, receipt);%0A%09%09%7D);%0A%0A%09%09Then(%22%5EJeff should be refunded %5C%5C$(%5C%5Cd+) - D$%22, (Integer amount) -%3E %7B%0A%09%09%09assertThat(refund)%0A%09%09%09%09.isNotNull()%0A%09%09%09%09.contains(amount.toString());%0A%09%09%7D);%0A%09%7D%09%0A%7D%0A

Create D_CucumberJava8Test.java