File tree Expand file tree Collapse file tree
core-groovy-2/src/test/groovy/com/baeldung Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,17 +28,16 @@ class CategoryUnitTest extends GroovyTestCase {
2828 }
2929 }
3030
31- // http://team.baeldung.com/browse/BAEL-20687
32- // void test_whenUsingTimeCategory_thenOperationOnNumber() {
33- // SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy")
34- // use (TimeCategory) {
35- // assert sdf.format(5.days.from.now) == sdf.format(new Date() + 5.days)
36- //
37- // sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss")
38- // assert sdf.format(10.minutes.from.now) == sdf.format(new Date() + 10.minutes)
39- // assert sdf.format(2.hours.ago) == sdf.format(new Date() - 2.hours)
40- // }
41- // }
31+ void test_whenUsingTimeCategory_thenOperationOnNumber () {
32+ SimpleDateFormat sdf = new SimpleDateFormat (" dd/MM/yyyy" )
33+ use (TimeCategory ) {
34+ assert sdf. format(5. days. from. now) == sdf. format(new Date () + 5. days)
35+
36+ sdf = new SimpleDateFormat (" dd/MM/yyyy hh:mm:ss" )
37+ assert sdf. format(10. minutes. from. now) == sdf. format(new Date () + 10. minutes)
38+ assert sdf. format(2. hours. ago) == sdf. format(new Date () - 2. hours)
39+ }
40+ }
4241
4342 void test_whenUsingDOMCategory_thenOperationOnXML () {
4443
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ class WebserviceManualTest extends GroovyTestCase {
7575 assert stories. size() == 5
7676 }
7777
78- /* see BAEL-3753
7978 void test_whenConsumingSoap_thenReceiveResponse () {
8079 def url = " http://www.dataaccess.com/webservicesserver/numberconversion.wso"
8180 def soapClient = new SOAPClient (url)
@@ -90,7 +89,6 @@ class WebserviceManualTest extends GroovyTestCase {
9089 def words = response.NumberToWordsResponse
9190 assert words == " one thousand two hundred and thirty four "
9291 }
93- */
9492
9593 void test_whenConsumingRestGet_thenReceiveResponse () {
9694 def path = " /get"
You can’t perform that action at this time.
0 commit comments