Repository navigation
Expand file tree
/
Copy pathElementTest.java
More file actions
114 lines (107 loc) · 2.99 KB
/
Copy pathElementTest.java
File metadata and controls
114 lines (107 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
*/
package org.biojava.nbio.structure;
import junit.framework.TestCase;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests for Element class.
*
* @author Peter Rose
* @since 3.0
*/
public class ElementTest {
@Test
public void testIsMetal() {
Element h = Element.H;
Assert.assertFalse(h.isMetal());
Element he = Element.He;
Assert.assertFalse(he.isMetal());
Element li = Element.Li;
Assert.assertTrue(li.isMetal());
Element be = Element.Be;
Assert.assertTrue(be.isMetal());
Element b = Element.B;
Assert.assertFalse(b.isMetal());
Element c = Element.C;
Assert.assertFalse(c.isMetal());
Element f = Element.F;
Assert.assertFalse(f.isMetal());
Element al = Element.Al;
Assert.assertTrue(al.isMetal());
Element sc = Element.Sc;
Assert.assertTrue(sc.isMetal());
Element la = Element.La;
Assert.assertTrue(la.isMetal());
Element ac = Element.Ac;
Assert.assertTrue(ac.isMetal());
};
@Test
public void testIsMetalloid() {
Element h = Element.H;
Assert.assertFalse(h.isMetalloid());
Element he = Element.He;
Assert.assertFalse(he.isMetalloid());
Element li = Element.Li;
Assert.assertFalse(li.isMetalloid());
Element be = Element.Be;
Assert.assertFalse(be.isMetalloid());
Element b = Element.B;
Assert.assertTrue(b.isMetalloid());
Element c = Element.C;
Assert.assertFalse(c.isMetalloid());
Element f = Element.F;
Assert.assertFalse(f.isMetalloid());
Element al = Element.Al;
Assert.assertFalse(al.isMetalloid());
Element sc = Element.Sc;
Assert.assertFalse(sc.isMetalloid());
Element la = Element.La;
Assert.assertFalse(la.isMetalloid());
Element ac = Element.Ac;
Assert.assertFalse(ac.isMetalloid());
}
@Test
public void testIsNonMetal() {
Element h = Element.H;
Assert.assertTrue(h.isNonMetal());
Element he = Element.He;
Assert.assertTrue(he.isNonMetal());
Element li = Element.Li;
Assert.assertFalse(li.isNonMetal());
Element be = Element.Be;
Assert.assertFalse(be.isNonMetal());
Element b = Element.B;
Assert.assertFalse(b.isNonMetal());
Element c = Element.C;
Assert.assertTrue(c.isNonMetal());
Element f = Element.F;
Assert.assertTrue(f.isNonMetal());
Element al = Element.Al;
Assert.assertFalse(al.isNonMetal());
Element sc = Element.Sc;
Assert.assertFalse(sc.isNonMetal());
Element la = Element.La;
Assert.assertFalse(la.isNonMetal());
Element ac = Element.Ac;
Assert.assertFalse(ac.isNonMetal());
}
}