/** * getVersion() method testing. Tests that returned value is * equal to the value specified in the constructor. */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "getVersion", args = {} ) public void testGetVersion() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned version value should be equal to the " + "value specified in the constructor.", ps.getVersion() == version); }
/** * getRounds() method testing. Tests that returned value is * equal to the value specified in the constructor. */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "getRounds", args = {} ) public void testGetRounds() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned rounds value should be equal to the " + "value specified in the constructor.", ps.getRounds() == rounds); }
/** * getWordSize() method testing. Tests that returned value is * equal to the value specified in the constructor. */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "getWordSize", args = {} ) public void testGetWordSize() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned wordSize value should be equal to the " + "value specified in the constructor.", ps.getWordSize() == wordSize); }
/** * hashCode() method testing. Tests that for equal objects hash codes * are equal. */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "hashCode", args = {} ) public void testHashCode() { int version = 1; int rounds = 5; int wordSize = 16; byte[] iv = {1, 2, 3, 4, 5, 6}; RC5ParameterSpec ps1 = new RC5ParameterSpec(version, rounds, wordSize, iv); RC5ParameterSpec ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); assertTrue("Equal objects should have the same hash codes.", ps1.hashCode() == ps2.hashCode()); }
@TestTargetNew( level = TestLevel.COMPLETE, method = "RC5ParameterSpec", args = {int.class, int.class, int.class} ) public void test_constructorIII() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps1 = new RC5ParameterSpec(version, rounds, wordSize); RC5ParameterSpec ps2 = new RC5ParameterSpec(version, rounds, wordSize); RC5ParameterSpec ps3 = new RC5ParameterSpec(version, rounds, wordSize + 1); assertTrue(ps1.equals(ps2)); assertFalse(ps1.equals(ps3)); }
/** * getVersion() method testing. Tests that returned value is * equal to the value specified in the constructor. */ public void testGetVersion() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned version value should be equal to the " + "value specified in the constructor.", ps.getVersion() == version); }
/** * getRounds() method testing. Tests that returned value is * equal to the value specified in the constructor. */ public void testGetRounds() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned rounds value should be equal to the " + "value specified in the constructor.", ps.getRounds() == rounds); }
/** * getWordSize() method testing. Tests that returned value is * equal to the value specified in the constructor. */ public void testGetWordSize() { int version = 1; int rounds = 5; int wordSize = 16; RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize); assertTrue("The returned wordSize value should be equal to the " + "value specified in the constructor.", ps.getWordSize() == wordSize); }
/** * hashCode() method testing. Tests that for equal objects hash codes * are equal. */ public void testHashCode() { int version = 1; int rounds = 5; int wordSize = 16; byte[] iv = {1, 2, 3, 4, 5, 6}; RC5ParameterSpec ps1 = new RC5ParameterSpec(version, rounds, wordSize, iv); RC5ParameterSpec ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); assertTrue("Equal objects should have the same hash codes.", ps1.hashCode() == ps2.hashCode()); }
public final void testHashCode030() { try { rc5ps = new RC5ParameterSpec(version+1,rounds,wordSize-1 , new byte[50] ); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); if (rc5ps2.equals(rc5ps)) { assertEquals("Two idem parameters inited have distint hashCode", rc5ps2.hashCode() , rc5ps.hashCode()); } } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testHashCode055() { try { rc5ps = new RC5ParameterSpec(version+1,rounds-1,wordSize , iv , 0); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); if (rc5ps2.equals(rc5ps)) { assertEquals("Two idem parameters inited have distint hashCode", rc5ps2.hashCode() , rc5ps.hashCode()); } } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testEquals030() { try { rc5ps = new RC5ParameterSpec(version+1,rounds,wordSize-1 ); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); assertFalse("Two diferent parameters inited are equals", rc5ps2.equals(rc5ps)); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt002() { try { rc5ps = new RC5ParameterSpec(120231231,0,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt003() { try { rc5ps = new RC5ParameterSpec(120231231,0,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt100() { try { rc5ps = new RC5ParameterSpec(-1,-1,wordSize); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt006() { try { rc5ps = new RC5ParameterSpec(120231231,213412,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt007() { try { rc5ps = new RC5ParameterSpec(120231231,213412,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt008() { try { rc5ps = new RC5ParameterSpec(120231231,213412,wordSize); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt009() { try { rc5ps = new RC5ParameterSpec(120231231,rounds,0); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt010() { try { rc5ps = new RC5ParameterSpec(120231231,rounds,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt011() { try { rc5ps = new RC5ParameterSpec(120231231,rounds,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testEquals054() { try { rc5ps = new RC5ParameterSpec(version+1,rounds-1,wordSize , iv50 , 4); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); assertFalse("Two diferent parameters inited are equals", rc5ps2.equals(rc5ps)); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt013() { try { rc5ps = new RC5ParameterSpec(120231231,-23412,0); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt014() { try { rc5ps = new RC5ParameterSpec(120231231,-23412,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt015() { try { rc5ps = new RC5ParameterSpec(120231231,-23412,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt016() { try { rc5ps = new RC5ParameterSpec(120231231,-23412,wordSize); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt017() { try { rc5ps = new RC5ParameterSpec(120231231,-1,0); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt018() { try { rc5ps = new RC5ParameterSpec(120231231,-1,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt019() { try { rc5ps = new RC5ParameterSpec(120231231,-1,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testEquals045() { try { rc5ps = new RC5ParameterSpec(version+1,rounds-1,wordSize-1 , iv50 ); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); assertFalse("Two diferent parameters inited are equals", rc5ps2.equals(rc5ps)); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt099() { try { rc5ps = new RC5ParameterSpec(-1,-1,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt022() { try { rc5ps = new RC5ParameterSpec(-23,0,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt023() { try { rc5ps = new RC5ParameterSpec(-23,0,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt024() { try { rc5ps = new RC5ParameterSpec(-23,0,wordSize); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testHashCode026() { try { rc5ps = new RC5ParameterSpec(version,rounds-1,wordSize , iv ); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); if (rc5ps2.equals(rc5ps)) { assertEquals("Two idem parameters inited have distint hashCode", rc5ps2.hashCode() , rc5ps.hashCode()); } } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testHashCode045() { try { rc5ps = new RC5ParameterSpec(version+1,rounds-1,wordSize-1 , new byte[50] , 0); RC5ParameterSpec rc5ps2 = new RC5ParameterSpec(version, rounds, wordSize, iv); if (rc5ps2.equals(rc5ps)) { assertEquals("Two idem parameters inited have distint hashCode", rc5ps2.hashCode() , rc5ps.hashCode()); } } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt027() { try { rc5ps = new RC5ParameterSpec(-23,213412,-1); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt029() { try { rc5ps = new RC5ParameterSpec(-23,rounds,0); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }
public final void testRC5ParameterSpecIntIntInt030() { try { rc5ps = new RC5ParameterSpec(-23,rounds,245); assertTrue("Can't instance RC5ParameterSpec", rc5ps instanceof RC5ParameterSpec); } catch (Throwable e) { fail("Failed with:" + e); } }