public class Kata{ public static String convert(int num){ return "" + num; } }
def convert(somethin):int(somethin)- public class Kata{
- public static String convert(int num){
- return "" + num;
- }
- }
import org.junit.Test; import static org.junit.Assert.assertEquals; public class convertTest { @Test public void test() { assertEquals("2", Kata.convert(2)); } }
import codewars_test as test# TODO Write testsimport solution # or from solution import example- import org.junit.Test;
- import static org.junit.Assert.assertEquals;
# test.assert_equals(actual, expected, [optional] message)@test.describe("convert")def convert():@test.it("")def test_case():test.assert_equals(1 + 1, 2)- public class convertTest {
- @Test
- public void test() {
- assertEquals("2", Kata.convert(2));
- }
- }