From a9bafe18ac7b8f9439cc98dcbeb95a2759b73d80 Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Thu, 9 Feb 2023 20:48:27 +0100 Subject: [PATCH] Aufwendungen Funktion + Test --- src/main/java/src/TasksFrame.java | 7 +++++++ src/test/java/src/TasksFrameTest.java | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index aa67ad4..27558af 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -1255,6 +1255,13 @@ public class TasksFrame extends JFrame { jPanel.add(e8); } + public int setupAufwendungen(int a, int b, int c, int d, int e) + { + int x = 0; + x = a+b+c+d+e; + return x; + } + public void setupArea() { diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index c99c3db..1d7c156 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -36,7 +36,13 @@ class TasksFrameTest { assertEquals(40,x2); } - + @Test + void aufwendungen() + { + TasksFrame tasksFrame = new TasksFrame(); + int x = tasksFrame.setupAufwendungen(20000,6000,10000,4000,100); + assertEquals(40100, x); + } @Test void setupPI() { TasksFrame tasksFrame = new TasksFrame();