FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest Class Reference

Junit test to test the FakeCryptoScheme. More...

Inheritance diagram for frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest:

Public Member Functions

 FakeCryptoSchemeTest (String toTest)
 Constructor.
void decryptInfinity ()
 Test the decryption of infinity.
void unique ()
 Test the unicity of all FakeCryptoScheme keys.
void decrypt ()
 Test the decrypt method.
void partialyDecrypt ()
 Test method partialyDecrypt.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void setUp ()
void tearDown () throws Exception
 Ends all queues.

Private Member Functions

void decrypt (AddableInteger val)
 Used to test the decryption.
void init ()
 Initialize.

Private Attributes

Random rand
 Random seed.
ArrayList< FakeCryptoSchemefcs
 All cryptoSchemes.
ArrayList< FakeEncryptedIntegerkeys
 All keys.
final AddableInteger ZERO = new AddableInteger(0)
 AddableInteger CONSTANT zero.
final AddableInteger V42 = new AddableInteger(42)
 AddableInteger CONSTANT 42.
final FakeEncryptedInteger TEN = new FakeEncryptedInteger("10")
 AddableBigInteger CONSTANT 10.
int agent = 10
 Number of cryptoSchemes.

Detailed Description

Junit test to test the FakeCryptoScheme.

Author
Eric Zbinden

Constructor & Destructor Documentation

◆ FakeCryptoSchemeTest()

frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.FakeCryptoSchemeTest ( String toTest)

Constructor.

Parameters
toTestthe method to test

Referenced by suite().

Member Function Documentation

◆ decrypt() [1/2]

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decrypt ( )

Test the decrypt method.

References decrypt(), and V42.

Referenced by decrypt(), and decryptInfinity().

Here is the call graph for this function:

◆ decrypt() [2/2]

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decrypt ( AddableInteger val)
private

◆ decryptInfinity()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decryptInfinity ( )

Test the decryption of infinity.

References decrypt(), and frodo2.solutionSpaces.AddableInteger.PlusInfinity.PLUS_INF.

Here is the call graph for this function:

◆ init()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.init ( )
private

Initialize.

References agent, fcs, keys, frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.resetCounter(), and ZERO.

Referenced by decrypt(), partialyDecrypt(), and unique().

Here is the call graph for this function:

◆ partialyDecrypt()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.partialyDecrypt ( )

◆ setUp()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.setUp ( )
protected
See also
junit.framework.TestCase#setUp()

References fcs, keys, and rand.

◆ suite()

TestSuite frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.suite ( )
static
Returns
the test suite for this test

References FakeCryptoSchemeTest().

Referenced by frodo2.algorithms.dpop.privacy.test.AllTestsP_DPOP.suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.tearDown ( ) throws Exception
protected

Ends all queues.

See also
junit.framework.TestCase#tearDown()

References fcs, keys, and rand.

◆ unique()

void frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.unique ( )

Test the unicity of all FakeCryptoScheme keys.

References init(), and keys.

Here is the call graph for this function:

Member Data Documentation

◆ agent

int frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.agent = 10
private

Number of cryptoSchemes.

Referenced by decrypt(), init(), and partialyDecrypt().

◆ fcs

ArrayList<FakeCryptoScheme> frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.fcs
private

All cryptoSchemes.

Referenced by decrypt(), init(), partialyDecrypt(), setUp(), and tearDown().

◆ keys

ArrayList<FakeEncryptedInteger> frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.keys
private

All keys.

Referenced by init(), partialyDecrypt(), setUp(), tearDown(), and unique().

◆ rand

Random frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.rand
private

Random seed.

Referenced by decrypt(), partialyDecrypt(), setUp(), and tearDown().

◆ TEN

final FakeEncryptedInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.TEN = new FakeEncryptedInteger("10")
private

AddableBigInteger CONSTANT 10.

Referenced by partialyDecrypt().

◆ V42

final AddableInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.V42 = new AddableInteger(42)
private

AddableInteger CONSTANT 42.

Referenced by decrypt(), and partialyDecrypt().

◆ ZERO

final AddableInteger frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.ZERO = new AddableInteger(0)
private

AddableInteger CONSTANT zero.

Referenced by init().


The documentation for this class was generated from the following file: