From 1cf003fc27f5d6ad7342f37d7a8f5521377a4721 Mon Sep 17 00:00:00 2001 From: fdai6499 Date: Fri, 10 Feb 2023 13:50:12 +0100 Subject: [PATCH] from binaray to int and then from int to binary again... works test complete --- src/test/java/src/TasksFrameTest.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index a6b7fbb..605b757 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -32,11 +32,15 @@ class TasksFrameTest { s = tasksFrame.calcBinaryToInt(1); assertEquals("1", s); } -// -// @Test -// public void test_binaryToIntAndIntToBinary() { -// -// } + + @Test + public void test_binaryToIntAndIntToBinary() { + TasksFrame tasksFrame = new TasksFrame(); + String s = tasksFrame.calcBinaryToInt(1010); + String s1 = tasksFrame.calcItoB(Integer.valueOf(s)); + int of = Integer.valueOf(s1); + assertEquals(1010, of); + } @Test void test_recursiveFib() {