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 TestJniInchiOutputStructure {
25  
26      /*
27       * Test method for 'net.sf.jniinchi.JniInchiOutputStructure.getReturnStatus()'
28       */
29      @Test
30      public void testGetReturnStatus() {
31          JniInchiOutputStructure output = new JniInchiOutputStructure(INCHI_RET.OKAY);
32          Assert.assertEquals(INCHI_RET.OKAY, output.getReturnStatus());
33      }
34  
35      /*
36       * Test method for 'net.sf.jniinchi.JniInchiOutputStructure.getMessage()'
37       */
38      @Test
39      public void testGetMessage() {
40          JniInchiOutputStructure output = new JniInchiOutputStructure(INCHI_RET.OKAY);
41          output.setMessage("Test message");
42          Assert.assertEquals("Test message", output.getMessage());
43      }
44  
45      /*
46       * Test method for 'net.sf.jniinchi.JniInchiOutputStructure.getLog()'
47       */
48      @Test
49      public void testGetLog() {
50          JniInchiOutputStructure output = new JniInchiOutputStructure(INCHI_RET.OKAY);
51          output.setLog("Test log");
52          Assert.assertEquals("Test log", output.getLog());
53      }
54  
55      /*
56       * Test method for 'net.sf.jniinchi.JniInchiOutputStructure.getWarningFlags()'
57       */
58      @Test
59      public void testGetWarningFlags() {
60          JniInchiOutputStructure output = new JniInchiOutputStructure(INCHI_RET.OKAY);
61          long[][] flags = {{1, 2}, {3, 4}};
62          output.setWarningFlags(flags);
63          Assert.assertEquals(flags, output.getWarningFlags());
64      }
65  
66  }