OSDN Git Service

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