Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Féry
mobile21
Commits
5b8d0176
Commit
5b8d0176
authored
Dec 12, 2020
by
Mathieu Féry (Mathius)
Browse files
Merge branch 'api' into jonctApiFront
parents
09ba9189
98097435
Pipeline
#28816
failed with stages
in 2 minutes and 59 seconds
Changes
4
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fr/iutnantes/miar/dndgenerator/api/dnd/DnDClass.java
View file @
5b8d0176
...
...
@@ -5,6 +5,7 @@ import androidx.annotation.Nullable;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Random
;
...
...
@@ -85,6 +86,7 @@ public class DnDClass implements Serializable, Comparable<DnDClass> {
clas
.
add
(
ELF
);
clas
.
add
(
DWARF
);
clas
.
add
(
HALFLING
);
Collections
.
sort
(
clas
,
DnDClass:
:
compareTo
);
classes
=
clas
;
}
...
...
app/src/main/java/fr/iutnantes/miar/dndgenerator/api/dnd/DnDSystem.java
View file @
5b8d0176
...
...
@@ -5,6 +5,7 @@ import androidx.annotation.Nullable;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Random
;
...
...
@@ -70,6 +71,7 @@ public class DnDSystem implements Serializable, Comparable<DnDSystem> {
sys
.
add
(
moc
);
sys
.
add
(
dd
);
sys
.
add
(
lotfp
);
Collections
.
sort
(
sys
,
DnDSystem:
:
compareTo
);
systems
=
sys
;
}
...
...
app/src/test/java/fr/iutnantes/miar/dndgenerator/api/dnd/DnDClassTest.java
View file @
5b8d0176
...
...
@@ -3,6 +3,7 @@ package fr.iutnantes.miar.dndgenerator.api.dnd;
import
org.junit.Test
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
@@ -19,7 +20,7 @@ public class DnDClassTest {
classSorted
.
add
(
DnDClass
.
DWARF
);
classSorted
.
add
(
DnDClass
.
FIGHTER
);
assertNotEquals
(
classSorted
,
classUnSorted
);
classUnSorted
.
sort
(
DnDClass:
:
compareTo
);
Collections
.
sort
(
classUnSorted
,
DnDClass:
:
compareTo
);
assertEquals
(
classSorted
,
classUnSorted
);
}
}
app/src/test/java/fr/iutnantes/miar/dndgenerator/api/dnd/DnDSystemTest.java
View file @
5b8d0176
...
...
@@ -3,6 +3,7 @@ package fr.iutnantes.miar.dndgenerator.api.dnd;
import
org.junit.Test
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
static
org
.
junit
.
Assert
.*;
...
...
@@ -23,7 +24,7 @@ public class DnDSystemTest {
systemsSorted
.
add
(
DnDSystem
.
lotfp
);
systemsSorted
.
add
(
DnDSystem
.
lbb
);
assertNotEquals
(
systemsSorted
,
systemsUnSorted
);
systemsUnSorted
.
sort
(
DnDSystem:
:
compareTo
);
Collections
.
sort
(
systemsUnSorted
,
DnDSystem:
:
compareTo
);
assertEquals
(
systemsSorted
,
systemsUnSorted
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment