Small fix in Java OCA tests

This commit is contained in:
Carlos Martín committed 2012-10-15 12:25:34 +02:00
1 parent f4bed4b426
commit 29077a8066
2 files changed
+22 -5

No files matched your search

+2 -2
View File
@@ -223,13 +223,13 @@ public class AclTest
assertTrue( res.getErrorMessage(), !res.isError() );
aclPool.info();
assertTrue( aclPool.getLength() == 3 );
assertTrue( aclPool.getLength() == 4 );
res = Acl.delete(client, res.getIntMessage());
assertTrue( res.getErrorMessage(), !res.isError() );
aclPool.info();
assertTrue( aclPool.getLength() == 2 );
assertTrue( aclPool.getLength() == 3 );
}
catch (RuleParseException e)
{
+20 -3
View File
@@ -13,11 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.*;
import org.junit.Test;
import org.opennebula.client.Client;
import org.opennebula.client.*;
public class SessionTest {
@@ -53,4 +52,22 @@ public class SessionTest {
assertNull("Client should complain about misspelled url", oneClient);
}
@Test
public void version()
{
Client oneClient = null;
try
{
oneClient = new Client();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
OneResponse res = oneClient.get_version();
assertTrue( res.getErrorMessage(), !res.isError() );
}
}