From 3b2e8e0eebed76cbecaa7758b2deb8af4d6e8e85 Mon Sep 17 00:00:00 2001 From: Marian Zeis <13335743+marianfoo@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:13:36 +0100 Subject: [PATCH] Exercise raindrops: fix input data type and testclass name (#34) * fix input data type and testclass name * change exp value to strings in testclass --- config.json | 2 +- exercises/practice/raindrops/zcl_raindrops.clas.abap | 2 +- .../raindrops/zcl_raindrops.clas.testclasses.abap | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.json b/config.json index 56d95bc..7674803 100644 --- a/config.json +++ b/config.json @@ -95,7 +95,7 @@ }, { "slug": "raindrops", - "name": "raindrops", + "name": "Raindrops", "uuid": "eaee0cbd-c525-4431-bedf-69bbce8c18bf", "practices": [], "prerequisites": [], diff --git a/exercises/practice/raindrops/zcl_raindrops.clas.abap b/exercises/practice/raindrops/zcl_raindrops.clas.abap index c0fec6b..e05591f 100644 --- a/exercises/practice/raindrops/zcl_raindrops.clas.abap +++ b/exercises/practice/raindrops/zcl_raindrops.clas.abap @@ -2,7 +2,7 @@ CLASS zcl_raindrops DEFINITION PUBLIC. PUBLIC SECTION. METHODS raindrops IMPORTING - input TYPE string OPTIONAL + input TYPE i RETURNING VALUE(result) TYPE string. ENDCLASS. diff --git a/exercises/practice/raindrops/zcl_raindrops.clas.testclasses.abap b/exercises/practice/raindrops/zcl_raindrops.clas.testclasses.abap index c991281..1df6667 100644 --- a/exercises/practice/raindrops/zcl_raindrops.clas.testclasses.abap +++ b/exercises/practice/raindrops/zcl_raindrops.clas.testclasses.abap @@ -1,4 +1,4 @@ -CLASS ltcl_raindropds DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. +CLASS ltcl_raindrops DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. PRIVATE SECTION. DATA cut TYPE REF TO zcl_raindrops. @@ -12,7 +12,7 @@ CLASS ltcl_raindropds DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT ENDCLASS. -CLASS ltcl_raindropds IMPLEMENTATION. +CLASS ltcl_raindrops IMPLEMENTATION. METHOD setup. cut = NEW zcl_raindrops( ). @@ -21,13 +21,13 @@ CLASS ltcl_raindropds IMPLEMENTATION. METHOD test_number1. cl_abap_unit_assert=>assert_equals( act = cut->raindrops( 1 ) - exp = 1 ). + exp = '1' ). ENDMETHOD. METHOD test_number2. cl_abap_unit_assert=>assert_equals( act = cut->raindrops( 307 ) - exp = 307 ). + exp = '307' ). ENDMETHOD. METHOD test_pling.