34 private $matchId = 1234;
37 private $percentage = 95;
40 private $agentClearingEvent;
42 protected function setUp()
44 $this->licenseRef = M::mock(LicenseRef::class);
45 $this->agentRef = M::mock(AgentRef::class);
47 $this->agentClearingEvent =
new AgentClearingEvent($this->licenseRef, $this->agentRef, $this->matchId, $this->percentage);
50 protected function tearDown()
55 public function testGetMatchId()
57 assertThat($this->agentClearingEvent->getMatchId(), is($this->matchId));
60 public function testGetLicenseRef()
62 assertThat($this->agentClearingEvent->getLicenseRef(), is($this->licenseRef));
65 public function testGetLicenseId()
68 $this->licenseRef->shouldReceive(
'getId')
71 ->andReturn($licenseId);
73 assertThat($this->agentClearingEvent->getLicenseId(), is($licenseId));
76 public function testGetLicenseShortName()
78 $licenseShortname =
"<licenseShortname>";
79 $this->licenseRef->shouldReceive(
'getShortName')
82 ->andReturn($licenseShortname);
84 assertThat($this->agentClearingEvent->getLicenseShortName(),
85 is($licenseShortname));
88 public function testGetLicenseFullName()
90 $licenseFullName =
"<licenseFullName>";
91 $this->licenseRef->shouldReceive(
'getFullName')
94 ->andReturn($licenseFullName);
96 assertThat($this->agentClearingEvent->getLicenseFullName(),
97 is($licenseFullName));
100 public function testGetEventType()
102 assertThat($this->agentClearingEvent->getEventType(),
103 is(ClearingResult::AGENT_DECISION_TYPE));
106 public function testGetComment()
108 assertThat($this->agentClearingEvent->getComment(), is(
""));
111 public function testGetReportinfo()
113 assertThat($this->agentClearingEvent->getReportinfo(), is(
""));
116 public function testGetAcknowledgement()
118 assertThat($this->agentClearingEvent->getAcknowledgement(), is(
""));
121 public function testIsRemoved()
123 assertThat($this->agentClearingEvent->isRemoved(), is(
false));
126 public function testGetAgentRef()
128 assertThat($this->agentClearingEvent->getAgentRef(), is($this->agentRef));
131 public function testGetAgentId()
134 $this->agentRef->shouldReceive(
'getAgentId')
137 ->andReturn($agentId);
139 assertThat($this->agentClearingEvent->getAgentId(), is($agentId));
142 public function testGetAgentName()
144 $agentName =
"<agentName>";
145 $this->agentRef->shouldReceive(
'getAgentName')
148 ->andReturn($agentName);
150 assertThat($this->agentClearingEvent->getAgentName(), is($agentName));
153 public function testGetPercentage()
155 assertThat($this->agentClearingEvent->getPercentage(), is($this->percentage));