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 ()
 
 testnoLicenseConflict_twoOfThem ()
 
 testnoLicenseConflict_twoOfThemNotComp ()
 
 testallLicenseInType_twoOfThem ()
 
 testallLicenseInType_twoOfThemNonComp ()
 

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
 
 $compatibilityDao
 
 $licenseDao
 

Detailed Description

@breif Unit test for DeciderAgent

Definition at line 38 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 224 of file DeciderAgentTest.php.

◆ createLicenseMatchWithLicId()

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

Create mock LicenseMatch object with getLicenseId returning $licId.

Parameters
int$licId
Returns
LicenseMatch

Definition at line 291 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 65 of file DeciderAgentTest.php.

◆ tearDown()

Fossology\Decider\DeciderAgentTest::tearDown ( )
protected

Remove test objects.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 103 of file DeciderAgentTest.php.

◆ testallLicenseInType_twoOfThem()

Fossology\Decider\DeciderAgentTest::testallLicenseInType_twoOfThem ( )
Test:
  1. Create matches with compliant license type.
  2. Test if DeciderAgent::allLicenseInType() returns true

Definition at line 415 of file DeciderAgentTest.php.

◆ testallLicenseInType_twoOfThemNonComp()

Fossology\Decider\DeciderAgentTest::testallLicenseInType_twoOfThemNonComp ( )
Test:
  1. Create matches with compliant and non-compliant license types.
  2. Test if DeciderAgent::allLicenseInType() returns false

Definition at line 460 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 200 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 133 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 115 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 154 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 177 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 254 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 273 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 237 of file DeciderAgentTest.php.

◆ testnoLicenseConflict_twoOfThem()

Fossology\Decider\DeciderAgentTest::testnoLicenseConflict_twoOfThem ( )
Test:
  1. Create compatibility matches.
  2. Test if DeciderAgent::noLicenseConflict() returns true

Definition at line 311 of file DeciderAgentTest.php.

◆ testnoLicenseConflict_twoOfThemNotComp()

Fossology\Decider\DeciderAgentTest::testnoLicenseConflict_twoOfThemNotComp ( )
Test:
  1. Create compatibility miss match for 2 licenses.
  2. Test if DeciderAgent::noLicenseConflict() returns false

Definition at line 363 of file DeciderAgentTest.php.


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