OSDN Git Service

556a7b75bd65c9d199826a2658a5eb75895fab47
[chemicraft/chemicraft.git] / common / pcc / chemicraft / testcase / FormulaTest.java
1 package pcc.chemicraft.testcase;
2
3 import static org.junit.Assert.*;
4
5 import org.junit.Test;
6
7 import pcc.chemicraft.util.Formula;
8
9 public class FormulaTest extends Formula {
10
11         public FormulaTest() {
12                 super("");
13         }
14
15         @Test
16         public void test() {
17                 Formula formula = new Formula("C64Si65535");
18                 assertEquals("変換がおかしいです(元素)",
19                                 formula.getAtoms(),
20                                 new String[] {"C", "Si"});
21
22                 assertEquals("変換がおかしいです(元素数)",
23                                 formula.getAmonts(),
24                                 new Integer[] {64, 65535});
25
26         }
27
28 }