From f3363ecedf485d9fcaac1da1f7c26203f22b0ba7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 26 Apr 2022 09:04:36 +0200 Subject: [PATCH 1/4] Add more tests --- testsrc/de/steamwar/command/GuardCommand.java | 24 ++++++++++++++ .../de/steamwar/command/GuardCommandTest.java | 33 +++++++++++++++++++ .../steamwar/command/TypeMapperCommand.java | 21 ++++++++++++ .../command/TypeMapperCommandTest.java | 17 ++++++++++ ...stTypeChecker.java => TestTypeMapper.java} | 2 +- 5 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 testsrc/de/steamwar/command/GuardCommand.java create mode 100644 testsrc/de/steamwar/command/GuardCommandTest.java create mode 100644 testsrc/de/steamwar/command/TypeMapperCommand.java create mode 100644 testsrc/de/steamwar/command/TypeMapperCommandTest.java rename testsrc/de/steamwar/command/dto/{TestTypeChecker.java => TestTypeMapper.java} (52%) diff --git a/testsrc/de/steamwar/command/GuardCommand.java b/testsrc/de/steamwar/command/GuardCommand.java new file mode 100644 index 0000000..4285daf --- /dev/null +++ b/testsrc/de/steamwar/command/GuardCommand.java @@ -0,0 +1,24 @@ +package de.steamwar.command; + +import de.steamwar.command.dto.ExecutionIdentifier; +import de.steamwar.command.dto.TestGuardChecker; +import de.steamwar.command.dto.TestSWCommand; + +public class GuardCommand extends TestSWCommand { + + public GuardCommand() { + super("typemapper"); + } + + @Register + public void test(@Guard String sender) { + throw new ExecutionIdentifier("RunTypeMapper"); + } + + @ClassGuard(value = String.class, local = true) + public AbstractGuardChecker getGuardChecker() { + return (TestGuardChecker) (s, guardCheckType, previousArguments, s2) -> { + throw new ExecutionIdentifier("GuardChecker " + guardCheckType); + }; + } +} diff --git a/testsrc/de/steamwar/command/GuardCommandTest.java b/testsrc/de/steamwar/command/GuardCommandTest.java new file mode 100644 index 0000000..9937185 --- /dev/null +++ b/testsrc/de/steamwar/command/GuardCommandTest.java @@ -0,0 +1,33 @@ +package de.steamwar.command; + +import de.steamwar.command.dto.ExecutionIdentifier; +import org.junit.Test; + +import static de.steamwar.AssertionUtils.assertCMDFramework; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.is; + +public class GuardCommandTest { + + @Test + public void test() { + GuardCommand cmd = new GuardCommand(); + try { + cmd.execute("test", "", new String[0]); + } catch (Exception e) { + assertCMDFramework(e, ExecutionIdentifier.class, "RunTypeMapper"); + } + } + + @Test + public void testTabComplete() { + GuardCommand cmd = new GuardCommand(); + try { + cmd.tabComplete("test", "", new String[]{""}); + } catch (Exception e) { + assertThat(e, is(instanceOf(ExecutionIdentifier.class))); + assertThat(e.getMessage(), is("GuardChecker TAB_COMPLETE")); + } + } +} diff --git a/testsrc/de/steamwar/command/TypeMapperCommand.java b/testsrc/de/steamwar/command/TypeMapperCommand.java new file mode 100644 index 0000000..466d5ca --- /dev/null +++ b/testsrc/de/steamwar/command/TypeMapperCommand.java @@ -0,0 +1,21 @@ +package de.steamwar.command; + +import de.steamwar.command.dto.ExecutionIdentifier; +import de.steamwar.command.dto.TestSWCommand; + +public class TypeMapperCommand extends TestSWCommand { + + public TypeMapperCommand() { + super("typemapper"); + } + + @Register + public void test(String sender, String s) { + throw new ExecutionIdentifier("RunTypeMapper with CustomMapper"); + } + + @ClassMapper(value = String.class, local = true) + public AbstractTypeMapper getTypeMapper() { + return SWCommandUtils.createMapper("1", "2", "3", "4", "5"); + } +} diff --git a/testsrc/de/steamwar/command/TypeMapperCommandTest.java b/testsrc/de/steamwar/command/TypeMapperCommandTest.java new file mode 100644 index 0000000..c7a20c6 --- /dev/null +++ b/testsrc/de/steamwar/command/TypeMapperCommandTest.java @@ -0,0 +1,17 @@ +package de.steamwar.command; + +import org.junit.Test; + +import java.util.List; + +import static de.steamwar.AssertionUtils.assertTabCompletes; + +public class TypeMapperCommandTest { + + @Test + public void testTabComplete() { + TypeMapperCommand cmd = new TypeMapperCommand(); + List strings = cmd.tabComplete("test", "", new String[]{""}); + assertTabCompletes(strings, "1", "2", "3", "4", "5"); + } +} diff --git a/testsrc/de/steamwar/command/dto/TestTypeChecker.java b/testsrc/de/steamwar/command/dto/TestTypeMapper.java similarity index 52% rename from testsrc/de/steamwar/command/dto/TestTypeChecker.java rename to testsrc/de/steamwar/command/dto/TestTypeMapper.java index 42a7933..edac69d 100644 --- a/testsrc/de/steamwar/command/dto/TestTypeChecker.java +++ b/testsrc/de/steamwar/command/dto/TestTypeMapper.java @@ -2,5 +2,5 @@ package de.steamwar.command.dto; import de.steamwar.command.AbstractTypeMapper; -public interface TestTypeChecker extends AbstractTypeMapper { +public interface TestTypeMapper extends AbstractTypeMapper { } From db254ed13b6aac9c055ff013ac796931a60577d4 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 27 Apr 2022 10:43:00 +0200 Subject: [PATCH 2/4] Update AbstractTypeMapper to allow Collection as return type --- src/de/steamwar/command/AbstractTypeMapper.java | 4 ++-- src/de/steamwar/command/CommandPart.java | 5 +++-- src/de/steamwar/command/SWCommandUtils.java | 16 +++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/de/steamwar/command/AbstractTypeMapper.java b/src/de/steamwar/command/AbstractTypeMapper.java index e5735fe..a9c326c 100644 --- a/src/de/steamwar/command/AbstractTypeMapper.java +++ b/src/de/steamwar/command/AbstractTypeMapper.java @@ -1,6 +1,6 @@ package de.steamwar.command; -import java.util.List; +import java.util.Collection; public interface AbstractTypeMapper { /** @@ -8,5 +8,5 @@ public interface AbstractTypeMapper { */ T map(K sender, String[] previousArguments, String s); - List tabCompletes(K sender, String[] previousArguments, String s); + Collection tabCompletes(K sender, String[] previousArguments, String s); } diff --git a/src/de/steamwar/command/CommandPart.java b/src/de/steamwar/command/CommandPart.java index 6a8ff4b..8a00c14 100644 --- a/src/de/steamwar/command/CommandPart.java +++ b/src/de/steamwar/command/CommandPart.java @@ -5,6 +5,7 @@ import lombok.Setter; import java.lang.reflect.Array; import java.util.Arrays; +import java.util.Collection; import java.util.List; class CommandPart { @@ -138,7 +139,7 @@ class CommandPart { return; } } - List strings = typeMapper.tabCompletes(sender, Arrays.copyOf(args, args.length - 1), args[args.length - 1]); + Collection strings = typeMapper.tabCompletes(sender, Arrays.copyOf(args, args.length - 1), args[args.length - 1]); if (strings != null) { current.addAll(strings); } @@ -157,7 +158,7 @@ class CommandPart { return; } - List strings = typeMapper.tabCompletes(sender, Arrays.copyOf(args, startIndex), args[startIndex]); + Collection strings = typeMapper.tabCompletes(sender, Arrays.copyOf(args, startIndex), args[startIndex]); if (strings != null) { current.addAll(strings); } diff --git a/src/de/steamwar/command/SWCommandUtils.java b/src/de/steamwar/command/SWCommandUtils.java index 4a6088a..25bb3a3 100644 --- a/src/de/steamwar/command/SWCommandUtils.java +++ b/src/de/steamwar/command/SWCommandUtils.java @@ -9,7 +9,6 @@ import java.lang.reflect.Parameter; import java.util.*; import java.util.function.BiFunction; import java.util.function.Function; -import java.util.stream.Collectors; @UtilityClass public class SWCommandUtils { @@ -198,20 +197,19 @@ public class SWCommandUtils { } public static AbstractTypeMapper> createEnumMapper(Class> enumClass) { - Enum[] enums = enumClass.getEnumConstants(); - List strings = Arrays.stream(enums).map(Enum::name).map(String::toLowerCase).collect(Collectors.toList()); + Map> enumMap = new HashMap<>(); + for (Enum e : enumClass.getEnumConstants()) { + enumMap.put(e.name(), e); + } return new AbstractTypeMapper>() { @Override public Enum map(Object commandSender, String[] previousArguments, String s) { - for (Enum e : enums) { - if (e.name().equalsIgnoreCase(s)) return e; - } - return null; + return enumMap.get(s); } @Override - public List tabCompletes(Object commandSender, String[] previousArguments, String s) { - return strings; + public Collection tabCompletes(Object commandSender, String[] previousArguments, String s) { + return enumMap.keySet(); } }; } From 56d8065eeee9bb4368b8ab04e14f47334d7fa52e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 27 Apr 2022 11:11:26 +0200 Subject: [PATCH 3/4] Fix CommandPart --- src/de/steamwar/command/CommandPart.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/command/CommandPart.java b/src/de/steamwar/command/CommandPart.java index 8a00c14..da84aa8 100644 --- a/src/de/steamwar/command/CommandPart.java +++ b/src/de/steamwar/command/CommandPart.java @@ -134,7 +134,7 @@ class CommandPart { public void generateTabComplete(List current, T sender, String[] args, int startIndex) { if (varArgType != null) { for (int i = startIndex; i < args.length - 1; i++) { - CheckArgumentResult validArgument = checkArgument(null, sender, args, i); + CheckArgumentResult validArgument = checkArgument(GuardCheckType.TAB_COMPLETE, sender, args, i); if (!validArgument.success) { return; } From 1a2d9b9c4d56bb38169425677b6f57ec8738e725 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 1 May 2022 22:37:01 +0200 Subject: [PATCH 4/4] Add license header --- .../command/AbstractGuardChecker.java | 19 ++++++++++++++++++ .../steamwar/command/AbstractSWCommand.java | 19 ++++++++++++++++++ .../steamwar/command/AbstractTypeMapper.java | 19 ++++++++++++++++++ src/de/steamwar/command/CommandPart.java | 19 ++++++++++++++++++ src/de/steamwar/command/SWCommandUtils.java | 19 ++++++++++++++++++ src/de/steamwar/command/SubCommand.java | 20 ++++++++++++++++++- testsrc/de/steamwar/AssertionUtils.java | 19 ++++++++++++++++++ .../de/steamwar/command/ArgumentCommand.java | 19 ++++++++++++++++++ .../steamwar/command/ArgumentCommandTest.java | 19 ++++++++++++++++++ testsrc/de/steamwar/command/GuardCommand.java | 19 ++++++++++++++++++ .../de/steamwar/command/GuardCommandTest.java | 19 ++++++++++++++++++ .../de/steamwar/command/SimpleCommand.java | 19 ++++++++++++++++++ .../steamwar/command/SimpleCommandTest.java | 19 ++++++++++++++++++ .../steamwar/command/TypeMapperCommand.java | 19 ++++++++++++++++++ .../command/TypeMapperCommandTest.java | 19 ++++++++++++++++++ .../command/dto/ExecutionIdentifier.java | 19 ++++++++++++++++++ .../command/dto/TestGuardChecker.java | 19 ++++++++++++++++++ .../steamwar/command/dto/TestSWCommand.java | 19 ++++++++++++++++++ .../steamwar/command/dto/TestTypeMapper.java | 19 ++++++++++++++++++ 19 files changed, 361 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/command/AbstractGuardChecker.java b/src/de/steamwar/command/AbstractGuardChecker.java index 8d1a269..f5f2597 100644 --- a/src/de/steamwar/command/AbstractGuardChecker.java +++ b/src/de/steamwar/command/AbstractGuardChecker.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; @FunctionalInterface diff --git a/src/de/steamwar/command/AbstractSWCommand.java b/src/de/steamwar/command/AbstractSWCommand.java index da80f23..fd371df 100644 --- a/src/de/steamwar/command/AbstractSWCommand.java +++ b/src/de/steamwar/command/AbstractSWCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import java.lang.annotation.*; diff --git a/src/de/steamwar/command/AbstractTypeMapper.java b/src/de/steamwar/command/AbstractTypeMapper.java index a9c326c..744b726 100644 --- a/src/de/steamwar/command/AbstractTypeMapper.java +++ b/src/de/steamwar/command/AbstractTypeMapper.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import java.util.Collection; diff --git a/src/de/steamwar/command/CommandPart.java b/src/de/steamwar/command/CommandPart.java index da84aa8..0688caf 100644 --- a/src/de/steamwar/command/CommandPart.java +++ b/src/de/steamwar/command/CommandPart.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import lombok.AllArgsConstructor; diff --git a/src/de/steamwar/command/SWCommandUtils.java b/src/de/steamwar/command/SWCommandUtils.java index 25bb3a3..067bc35 100644 --- a/src/de/steamwar/command/SWCommandUtils.java +++ b/src/de/steamwar/command/SWCommandUtils.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import lombok.Getter; diff --git a/src/de/steamwar/command/SubCommand.java b/src/de/steamwar/command/SubCommand.java index 2f41791..603e6d3 100644 --- a/src/de/steamwar/command/SubCommand.java +++ b/src/de/steamwar/command/SubCommand.java @@ -1,10 +1,28 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; diff --git a/testsrc/de/steamwar/AssertionUtils.java b/testsrc/de/steamwar/AssertionUtils.java index 58fe01c..ed8c8ca 100644 --- a/testsrc/de/steamwar/AssertionUtils.java +++ b/testsrc/de/steamwar/AssertionUtils.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar; import de.steamwar.command.CommandFrameworkException; diff --git a/testsrc/de/steamwar/command/ArgumentCommand.java b/testsrc/de/steamwar/command/ArgumentCommand.java index c630a93..b4ce500 100644 --- a/testsrc/de/steamwar/command/ArgumentCommand.java +++ b/testsrc/de/steamwar/command/ArgumentCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/ArgumentCommandTest.java b/testsrc/de/steamwar/command/ArgumentCommandTest.java index 7b74126..c546127 100644 --- a/testsrc/de/steamwar/command/ArgumentCommandTest.java +++ b/testsrc/de/steamwar/command/ArgumentCommandTest.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/GuardCommand.java b/testsrc/de/steamwar/command/GuardCommand.java index 4285daf..7ee1854 100644 --- a/testsrc/de/steamwar/command/GuardCommand.java +++ b/testsrc/de/steamwar/command/GuardCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/GuardCommandTest.java b/testsrc/de/steamwar/command/GuardCommandTest.java index 9937185..233333c 100644 --- a/testsrc/de/steamwar/command/GuardCommandTest.java +++ b/testsrc/de/steamwar/command/GuardCommandTest.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/SimpleCommand.java b/testsrc/de/steamwar/command/SimpleCommand.java index 88d0bd6..16d565f 100644 --- a/testsrc/de/steamwar/command/SimpleCommand.java +++ b/testsrc/de/steamwar/command/SimpleCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/SimpleCommandTest.java b/testsrc/de/steamwar/command/SimpleCommandTest.java index 4ba3ef1..dcb286c 100644 --- a/testsrc/de/steamwar/command/SimpleCommandTest.java +++ b/testsrc/de/steamwar/command/SimpleCommandTest.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/TypeMapperCommand.java b/testsrc/de/steamwar/command/TypeMapperCommand.java index 466d5ca..a81500f 100644 --- a/testsrc/de/steamwar/command/TypeMapperCommand.java +++ b/testsrc/de/steamwar/command/TypeMapperCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import de.steamwar.command.dto.ExecutionIdentifier; diff --git a/testsrc/de/steamwar/command/TypeMapperCommandTest.java b/testsrc/de/steamwar/command/TypeMapperCommandTest.java index c7a20c6..32b5b47 100644 --- a/testsrc/de/steamwar/command/TypeMapperCommandTest.java +++ b/testsrc/de/steamwar/command/TypeMapperCommandTest.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command; import org.junit.Test; diff --git a/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java b/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java index bde7122..d03b78f 100644 --- a/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java +++ b/testsrc/de/steamwar/command/dto/ExecutionIdentifier.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command.dto; public class ExecutionIdentifier extends RuntimeException { diff --git a/testsrc/de/steamwar/command/dto/TestGuardChecker.java b/testsrc/de/steamwar/command/dto/TestGuardChecker.java index ff38ebc..b85fa17 100644 --- a/testsrc/de/steamwar/command/dto/TestGuardChecker.java +++ b/testsrc/de/steamwar/command/dto/TestGuardChecker.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command.dto; import de.steamwar.command.AbstractGuardChecker; diff --git a/testsrc/de/steamwar/command/dto/TestSWCommand.java b/testsrc/de/steamwar/command/dto/TestSWCommand.java index 9081000..5fd3b3f 100644 --- a/testsrc/de/steamwar/command/dto/TestSWCommand.java +++ b/testsrc/de/steamwar/command/dto/TestSWCommand.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command.dto; import de.steamwar.command.AbstractSWCommand; diff --git a/testsrc/de/steamwar/command/dto/TestTypeMapper.java b/testsrc/de/steamwar/command/dto/TestTypeMapper.java index edac69d..96c4c6c 100644 --- a/testsrc/de/steamwar/command/dto/TestTypeMapper.java +++ b/testsrc/de/steamwar/command/dto/TestTypeMapper.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package de.steamwar.command.dto; import de.steamwar.command.AbstractTypeMapper;