FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Decider\DeciderAgentTest Class Reference
Inheritance diagram for Fossology\Decider\DeciderAgentTest:
Inheritance graph
Collaboration diagram for Fossology\Decider\DeciderAgentTest:
Collaboration graph

Public Member Functions

 testAreNomosMatchesInsideAMonkMatchIfNoneAtAll ()
 
 testAreNomosMatchesInsideAMonkMatchIfNoMonk ()
 
 testAreNomosMatchesInsideAMonkMatchIfNoNomos ()
 
 testAreNomosMatchesInsideAMonkMatchIfNotFit ()
 
 testAreNomosMatchesInsideAMonkMatchIfFit ()
 
 testAreNomosMonkNinkaAgreed_notIfOnlyTwoOfThem ()
 
 testAreNomosMonkNinkaAgreed_alsoMultiMatch ()
 
 testAreNomosMonkNinkaAgreed_notIfAnyOther ()
 

Protected Member Functions

 setUp ()
 Setup test objects, database and repo. More...
 
 tearDown ()
 Remove test objects. More...
 
 createLicenseMatch ($agentName, $matchId)
 Create mock LicenseMatch object with getLicenseFileId returning $matchId. More...
 
 createLicenseMatchWithLicId ($licId)
 Create mock LicenseMatch object with getLicenseId returning $licId. More...
 

Private Attributes

 $dbManager
 
 $clearingDao
 
 $clearingDecisionProcessor
 
 $agentLicenseEventProcessor
 
 $uploadDao
 
 $highlightDao
 
 $showJobsDao
 
 $copyrightDao
 

Detailed Description

@breif Unit test for DeciderAgent

Definition at line 33 of file DeciderAgentTest.php.

Member Function Documentation

◆ createLicenseMatch()

Fossology\Decider\DeciderAgentTest::createLicenseMatch (   $agentName,
  $matchId 
)
protected

Create mock LicenseMatch object with getLicenseFileId returning $matchId.

Parameters
string$agentName
int$matchId
Returns
Mockery::MockInterface

Definition at line 211 of file DeciderAgentTest.php.

◆ createLicenseMatchWithLicId()

Fossology\Decider\DeciderAgentTest::createLicenseMatchWithLicId (   $licId)
protected

Create mock LicenseMatch object with getLicenseId returning $licId.

Parameters
int$licId
Returns
Mockery::MockInterface

Definition at line 278 of file DeciderAgentTest.php.

◆ setUp()

Fossology\Decider\DeciderAgentTest::setUp ( )
protected

Setup test objects, database and repo.

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 56 of file DeciderAgentTest.php.

◆ tearDown()

Fossology\Decider\DeciderAgentTest::tearDown ( )
protected

Remove test objects.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 90 of file DeciderAgentTest.php.

◆ testAreNomosMatchesInsideAMonkMatchIfFit()

Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfFit ( )
Test:
  1. Create monk license match
  2. Create nomos license match inside monk match
  3. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns true

Definition at line 187 of file DeciderAgentTest.php.

◆ testAreNomosMatchesInsideAMonkMatchIfNoMonk()

Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoMonk ( )
Test:
  1. Create nomos license match only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false

Definition at line 120 of file DeciderAgentTest.php.

◆ testAreNomosMatchesInsideAMonkMatchIfNoneAtAll()

Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoneAtAll ( )
Test:
  1. Create empty license matches
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false

Definition at line 102 of file DeciderAgentTest.php.

◆ testAreNomosMatchesInsideAMonkMatchIfNoNomos()

Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNoNomos ( )
Test:
  1. Create monk license matche only
  2. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false

Definition at line 141 of file DeciderAgentTest.php.

◆ testAreNomosMatchesInsideAMonkMatchIfNotFit()

Fossology\Decider\DeciderAgentTest::testAreNomosMatchesInsideAMonkMatchIfNotFit ( )
Test:
  1. Create monk license match
  2. Create nomos license match bigger than monk license match
  3. Test if DeciderAgent::areNomosMatchesInsideAMonkMatch() returns false

Definition at line 164 of file DeciderAgentTest.php.

◆ testAreNomosMonkNinkaAgreed_alsoMultiMatch()

Fossology\Decider\DeciderAgentTest::testAreNomosMonkNinkaAgreed_alsoMultiMatch ( )
Test:
  1. Create monk, nomos and ninka license match
  2. Add multiple match for an agent with the same license id
  3. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns true

Definition at line 241 of file DeciderAgentTest.php.

◆ testAreNomosMonkNinkaAgreed_notIfAnyOther()

Fossology\Decider\DeciderAgentTest::testAreNomosMonkNinkaAgreed_notIfAnyOther ( )
Test:
  1. Create monk, nomos and ninka license match
  2. Add multiple match for an agent with the different license id
  3. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns false

Definition at line 260 of file DeciderAgentTest.php.

◆ testAreNomosMonkNinkaAgreed_notIfOnlyTwoOfThem()

Fossology\Decider\DeciderAgentTest::testAreNomosMonkNinkaAgreed_notIfOnlyTwoOfThem ( )
Test:
  1. Create monk and nomos license match only
  2. Test if DeciderAgent::areNomosMonkNinkaAgreed() returns false

Definition at line 224 of file DeciderAgentTest.php.


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