clues: Don't return clue instances for empty text
This commit ensures that all clues providing a static `forText()` method return null when given an empty string as clue text.
This commit is contained in:
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.ObjectID;
|
import net.runelite.api.ObjectID;
|
||||||
@@ -171,16 +172,18 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
private final String npc;
|
private final String npc;
|
||||||
private final WorldPoint location;
|
private final WorldPoint location;
|
||||||
private final String area;
|
private final String area;
|
||||||
|
@Nullable
|
||||||
private final String question;
|
private final String question;
|
||||||
|
@Nullable
|
||||||
private final String answer;
|
private final String answer;
|
||||||
private int objectId;
|
private int objectId;
|
||||||
|
|
||||||
private AnagramClue(String text, String npc, WorldPoint location, String area)
|
private AnagramClue(String text, String npc, WorldPoint location, String area)
|
||||||
{
|
{
|
||||||
this(text, npc, location, area, "", null);
|
this(text, npc, location, area, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AnagramClue(String text, String npc, WorldPoint location, String area, String question, String answer)
|
private AnagramClue(String text, String npc, WorldPoint location, String area, @Nullable String question, @Nullable String answer)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.npc = npc;
|
this.npc = npc;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
@@ -64,15 +65,17 @@ public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScr
|
|||||||
private String npc;
|
private String npc;
|
||||||
private WorldPoint location;
|
private WorldPoint location;
|
||||||
private String area;
|
private String area;
|
||||||
|
@Nullable
|
||||||
private String question;
|
private String question;
|
||||||
|
@Nullable
|
||||||
private String answer;
|
private String answer;
|
||||||
|
|
||||||
private CipherClue(String text, String npc, WorldPoint location, String area)
|
private CipherClue(String text, String npc, WorldPoint location, String area)
|
||||||
{
|
{
|
||||||
this(text, npc, location, area, "", null);
|
this(text, npc, location, area, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CipherClue(String text, String npc, WorldPoint location, String area, String question, String answer)
|
private CipherClue(String text, String npc, WorldPoint location, String area, @Nullable String question, @Nullable String answer)
|
||||||
{
|
{
|
||||||
this.text = "The cipher reveals who to speak to next: " + text;
|
this.text = "The cipher reveals who to speak to next: " + text;
|
||||||
this.npc = npc;
|
this.npc = npc;
|
||||||
@@ -129,7 +132,7 @@ public class CipherClue extends ClueScroll implements TextClueScroll, NpcClueScr
|
|||||||
{
|
{
|
||||||
for (CipherClue clue : CLUES)
|
for (CipherClue clue : CLUES)
|
||||||
{
|
{
|
||||||
if (clue.text.equalsIgnoreCase(text) || clue.question.equalsIgnoreCase(text))
|
if (text.equalsIgnoreCase(clue.text) || text.equalsIgnoreCase(clue.question))
|
||||||
{
|
{
|
||||||
return clue;
|
return clue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import static net.runelite.api.NullObjectID.NULL_1293;
|
import static net.runelite.api.NullObjectID.NULL_1293;
|
||||||
@@ -331,6 +332,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
private final int objectId;
|
private final int objectId;
|
||||||
private final WorldPoint location;
|
private final WorldPoint location;
|
||||||
private final String solution;
|
private final String solution;
|
||||||
|
@Nullable
|
||||||
private final String questionText;
|
private final String questionText;
|
||||||
|
|
||||||
private CrypticClue(String text, WorldPoint location, String solution)
|
private CrypticClue(String text, WorldPoint location, String solution)
|
||||||
@@ -340,12 +342,12 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
|
|
||||||
private CrypticClue(String text, int objectId, WorldPoint location, String solution)
|
private CrypticClue(String text, int objectId, WorldPoint location, String solution)
|
||||||
{
|
{
|
||||||
this(text, null, objectId, location, solution, "");
|
this(text, null, objectId, location, solution, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CrypticClue(String text, String npc, WorldPoint location, String solution)
|
private CrypticClue(String text, String npc, WorldPoint location, String solution)
|
||||||
{
|
{
|
||||||
this(text, npc, -1, location, solution, "");
|
this(text, npc, -1, location, solution, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CrypticClue(String text, String npc, WorldPoint location, String solution, boolean requiresLight)
|
private CrypticClue(String text, String npc, WorldPoint location, String solution, boolean requiresLight)
|
||||||
@@ -366,10 +368,10 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
|
|
||||||
private CrypticClue(String text, String npc, int objectId, WorldPoint location, String solution)
|
private CrypticClue(String text, String npc, int objectId, WorldPoint location, String solution)
|
||||||
{
|
{
|
||||||
this(text, npc, objectId, location, solution, "");
|
this(text, npc, objectId, location, solution, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CrypticClue(String text, String npc, int objectId, WorldPoint location, String solution, String questionText)
|
private CrypticClue(String text, String npc, int objectId, WorldPoint location, String solution, @Nullable String questionText)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.npc = npc;
|
this.npc = npc;
|
||||||
@@ -465,7 +467,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
{
|
{
|
||||||
for (CrypticClue clue : CLUES)
|
for (CrypticClue clue : CLUES)
|
||||||
{
|
{
|
||||||
if (clue.text.equalsIgnoreCase(text) || clue.questionText.equalsIgnoreCase(text))
|
if (text.equalsIgnoreCase(clue.text) || text.equalsIgnoreCase(clue.questionText))
|
||||||
{
|
{
|
||||||
return clue;
|
return clue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class AnagramClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(AnagramClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class CipherClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(CipherClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class CrypticClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(CrypticClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class EmoteClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(EmoteClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class FairyRingClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(FairyRingClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class FaloTheBardClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(FaloTheBardClue.forText(""));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class HotColdClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(HotColdClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class MusicClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(MusicClue.forText(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class SkillChallengeClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(SkillChallengeClue.forText("", ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Jordan Atwood <jordan.atwood423@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.cluescrolls.clues;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class ThreeStepCrypticClueTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void forTextEmptyString()
|
||||||
|
{
|
||||||
|
assertNull(ThreeStepCrypticClue.forText("", ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user