1 25 26 package org.objectweb.jonas.jtests.clients.distribution; 27 28 import java.rmi.NoSuchObjectException ; 29 import java.rmi.ServerException ; 30 31 public abstract class A_bankWrite extends A_bank { 32 33 public A_bankWrite(String name) { 34 super(name); 35 } 36 37 public void testBasicMove() throws Exception { 38 ope(OP_MOVE, 0, 9, 1, 1); 39 } 40 41 public void testBasicMoveNC() throws Exception { 42 ope(OP_MOVE, 0, 9, 1, 1, 5, false); 43 } 44 45 public void testBasicRemove() throws Exception { 46 ope(OP_CREATE, 3000, 4000, 1, 1); 47 ope(OP_REMOVE, 3000, 4000, 1, 1); 48 } 49 50 public void testMultiRemove() throws Exception { 51 ope(OP_CREATE, 3000, 4000, 100, 1); 52 ope(OP_REMOVE, 3000, 4000, 1, 8); 53 } 54 55 public void testManyRemove() throws Exception { 56 ope(OP_CREATE, 3000, 4000, 300, 1); 57 ope(OP_REMOVE, 3000, 4000, 200, 1); 58 } 59 60 63 public void testBasicRB() throws Exception { 64 ope(OP_MOVE, 0, 2, 4, 1, 700); 65 } 66 67 public void testMultiRB() throws Exception { 68 ope(OP_MOVE, 0, 4, 4, 5, 600); 69 } 70 71 72 public void testBasicCreate() throws Exception { 73 ope(OP_CREATE, 100, 150, 1, 1); 74 } 75 76 public void testShortCreate() throws Exception { 77 ope(OP_CREATE, 6000, 8000, 100, 1); 78 } 79 80 public void testMultiCreate() throws Exception { 81 ope(OP_CREATE, 1000, 1900, 1, 12); 82 } 83 84 85 public void testMultiMove() throws Exception { 86 ope(OP_MOVE, 0, 5, 1, 5); 87 } 88 89 94 public void testAccessRemoved() throws Exception { 95 int num = 700; 96 manager.readBalance(num); 98 manager.delAccount(num); 99 try { 100 manager.readBalance(); 102 fail("must throw NoSuchObjectException"); 103 } catch (NoSuchObjectException e) { 104 manager = null; } catch (ServerException e) { 106 manager = null; if (! (e.getCause() instanceof NoSuchObjectException )) { 108 fail("Should receive NoSuchObjectException"); 109 } 110 } 111 } 112 113 } 114 | Popular Tags |