BAEL-2565
Test code consistency
This commit is contained in:
parent
9f74802e9b
commit
ab598e0de4
@ -40,27 +40,21 @@ public class Element4UnitTest {
|
|||||||
@Test
|
@Test
|
||||||
public void whenLocatebyLabel_thenReturnCorrectValue() {
|
public void whenLocatebyLabel_thenReturnCorrectValue() {
|
||||||
for (Element4 e4 : Element4.values()) {
|
for (Element4 e4 : Element4.values()) {
|
||||||
Element4 result = Element4.valueOfLabel(e4.label);
|
assertSame(e4, Element4.valueOfLabel(e4.label));
|
||||||
|
|
||||||
assertSame(e4, result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenLocatebyAtmNum_thenReturnCorrectValue() {
|
public void whenLocatebyAtmNum_thenReturnCorrectValue() {
|
||||||
for (Element4 e4 : Element4.values()) {
|
for (Element4 e4 : Element4.values()) {
|
||||||
Element4 result = Element4.valueOfAtomicNumber(e4.atomicNumber);
|
assertSame(e4, Element4.valueOfAtomicNumber(e4.atomicNumber));
|
||||||
|
|
||||||
assertSame(e4, result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenLocatebyAtmWt_thenReturnCorrectValue() {
|
public void whenLocatebyAtmWt_thenReturnCorrectValue() {
|
||||||
for (Element4 e4 : Element4.values()) {
|
for (Element4 e4 : Element4.values()) {
|
||||||
Element4 result = Element4.valueOfAtomicWeight(e4.atomicWeight);
|
assertSame(e4, Element4.valueOfAtomicWeight(e4.atomicWeight));
|
||||||
|
|
||||||
assertSame(e4, result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,9 +64,7 @@ public class Element4UnitTest {
|
|||||||
@Test
|
@Test
|
||||||
public void whenCallingToString_thenReturnLabel() {
|
public void whenCallingToString_thenReturnLabel() {
|
||||||
for (Element4 e4 : Element4.values()) {
|
for (Element4 e4 : Element4.values()) {
|
||||||
String result = e4.toString();
|
assertEquals(e4.label, e4.toString());
|
||||||
|
|
||||||
assertEquals(e4.label, result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user