1   /*
2    * Copyright 2006-2010 Sam Adams <sea36 at users.sourceforge.net>
3    *
4    * This file is part of JNI-InChI.
5    *
6    * JNI-InChI is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Lesser General Public License as published
8    * by the Free Software Foundation, either version 3 of the License, or
9    * (at your option) any later version.
10   *
11   * JNI-InChI is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Lesser General Public License for more details.
15   *
16   * You should have received a copy of the GNU Lesser General Public License
17   * along with JNI-InChI.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package net.sf.jniinchi;
20  
21  import org.junit.Assert;
22  import org.junit.Test;
23  
24  public class TestJniInchiOutput {
25  
26      /*
27       * Test method for 'net.sf.jniinchi.JniInchiOutput.getReturnStatus()'
28       */
29      @Test
30      public void testGetReturnStatus() {
31          JniInchiOutput output = new JniInchiOutput(INCHI_RET.OKAY, null, null, null, null);
32          Assert.assertEquals(INCHI_RET.OKAY, output.getReturnStatus());
33      }
34  
35      /*
36       * Test method for 'net.sf.jniinchi.JniInchiOutput.getInchi()'
37       */
38      @Test
39      public void testGetInchi() {
40          JniInchiOutput output = new JniInchiOutput(null, "Inchi=1/C6H6/c1-2-4-6-5-3-1/h1-6H", null, null, null);
41          Assert.assertEquals("Inchi=1/C6H6/c1-2-4-6-5-3-1/h1-6H", output.getInchi());
42      }
43  
44      /*
45       * Test method for 'net.sf.jniinchi.JniInchiOutput.getAuxInfo()'
46       */
47      @Test
48      public void testGetAuxInfo() {
49          JniInchiOutput output = new JniInchiOutput(null, null, "AuxInfo=1/0/N:1,2,6,3,5,4/E:(1,2,3,4,5,6)/rA:6nCCCCCC/rB:d1;s2;d3;s4;s1d5;/rC:-.7145,.4125,0;-.7145,-.4125,0;0,-.825,0;.7145,-.4125,0;.7145,.4125,0;0,.825,0;", null, null);
50          Assert.assertEquals("AuxInfo=1/0/N:1,2,6,3,5,4/E:(1,2,3,4,5,6)/rA:6nCCCCCC/rB:d1;s2;d3;s4;s1d5;/rC:-.7145,.4125,0;-.7145,-.4125,0;0,-.825,0;.7145,-.4125,0;.7145,.4125,0;0,.825,0;", output.getAuxInfo());
51      }
52  
53      /*
54       * Test method for 'net.sf.jniinchi.JniInchiOutput.getMessage()'
55       */
56      @Test
57      public void testGetMessage() {
58          JniInchiOutput output = new JniInchiOutput(null, null, null, "Test message", null);
59          Assert.assertEquals("Test message", output.getMessage());
60      }
61  
62      /*
63       * Test method for 'net.sf.jniinchi.JniInchiOutput.getLog()'
64       */
65      @Test
66      public void testGetLog() {
67          JniInchiOutput output = new JniInchiOutput(null, null, null, null, "Test log");
68          Assert.assertEquals("Test log", output.getLog());
69      }
70  }