public function testUpdate()
 {
     $key = new ApiKey(123, 'dummyvcode');
     $owner = new AccountCharacter($key, 123);
     $owner->setCorporationId(11);
     $call = new ApiCall('dummyapi', $owner, $key);
     $this->api->update($call, $key, $this->pheal);
     $this->entityManager->flush();
     $repo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:CorpBlueprint');
     $blueprint = $repo->findOneByItemId(42);
     $this->assertEquals(11, $blueprint->getLocationId());
     $this->assertEquals(22, $blueprint->getTypeId());
     $this->assertEquals('TypeName', $blueprint->getTypeName());
     $this->assertEquals(33, $blueprint->getFlag());
     $this->assertEquals(-44, $blueprint->getQuantity());
     $this->assertEquals(12, $blueprint->getTimeEfficiency());
     $this->assertEquals(13, $blueprint->getMaterialEfficiency());
     $this->assertEquals(-55, $blueprint->getRuns());
 }
 public function testUpdate()
 {
     $key = new ApiKey(123, 'dummyvcode');
     $owner = new AccountCharacter($key, 123);
     $owner->setCorporationId(11);
     $call = new ApiCall('dummyapi', $owner, $key);
     $this->api->update($call, $key, $this->pheal);
     $this->entityManager->flush();
     $repo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:CorpFacility');
     $facility = $repo->findOneByFacilityId(1);
     $this->assertEquals(2, $facility->getTypeId());
     $this->assertEquals('TypeName', $facility->getTypeName());
     $this->assertEquals(3, $facility->getSolarSystemId());
     $this->assertEquals('SolarSystemName', $facility->getSolarSystemName());
     $this->assertEquals(4, $facility->getRegionId());
     $this->assertEquals('RegionName', $facility->getRegionName());
     $this->assertEquals(5, $facility->getStarbaseModifier());
     $this->assertEquals(6, $facility->getTax());
 }
 public function testUpdate()
 {
     $key = new ApiKey(123, 'dummyvcode');
     $owner = new AccountCharacter($key, 123);
     $owner->setCorporationId(11);
     $call = new ApiCall('dummyapi', $owner, $key);
     $this->api->update($call, $key, $this->pheal);
     $this->entityManager->flush();
     $repo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:CorpIndustryJob');
     $job = $repo->findOneByJobId(11);
     $this->assertEquals(11, $job->getOwnerId());
     $this->assertEquals(22, $job->getInstallerId());
     $this->assertEquals('InstallerName', $job->getInstallerName());
     $this->assertEquals(33, $job->getFacilityId());
     $this->assertEquals(44, $job->getSolarSystemId());
     $this->assertEquals('SolarSystemName', $job->getSolarSystemName());
     $this->assertEquals(55, $job->getStationId());
     $this->assertEquals(66, $job->getActivityId());
     $this->assertEquals(77, $job->getBlueprintId());
     $this->assertEquals('BlueprintTypeName', $job->getBlueprintTypeName());
     $this->assertEquals(99, $job->getBlueprintLocationId());
     $this->assertEquals(2, $job->getOutputLocationId());
     $this->assertEquals(3, $job->getRuns());
     $this->assertEquals(4.1, $job->getCost());
     $this->assertEquals(0, $job->getTeamId());
     $this->assertEquals(5, $job->getLicensedRuns());
     $this->assertEquals(0.2, $job->getProbability());
     $this->assertEquals(6, $job->getProductTypeId());
     $this->assertEquals('ProductTypeName', $job->getProductTypeName());
     $this->assertEquals(1, $job->getStatus());
     $this->assertEquals(816000, $job->getTimeInSeconds());
     $this->assertEquals(new \DateTime('2015-04-01 12:32:59'), $job->getStartDate());
     $this->assertEquals(new \DateTime('2015-05-02 23:12:59'), $job->getEndDate());
     $this->assertEquals(new \DateTime('0001-01-01 00:00:00'), $job->getPauseDate());
     $this->assertEquals(new \DateTime('0001-01-01 00:00:00'), $job->getCompletedDate());
     $this->assertEquals(0, $job->getCompletedCharacterId());
     $this->assertEquals(0, $job->getSuccessfulRuns());
 }
 public function testUpdate()
 {
     $key = new ApiKey(123, 'dummyvcode');
     $owner = new AccountCharacter($key, 123);
     $owner->setCorporationId(11);
     $call = new ApiCall('dummyapi', $owner, $key);
     $this->api->update($call, $key, $this->pheal);
     $this->entityManager->flush();
     $repo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:CorpCustomsOffice');
     $customsOffice = $repo->findOneByItemId(42);
     $this->assertEquals(11, $customsOffice->getSolarSystemId());
     $this->assertEquals('SolarSystemName', $customsOffice->getSolarSystemName());
     $this->assertEquals(22, $customsOffice->getReinforceHour());
     $this->assertEquals(true, $customsOffice->isAllowAlliance());
     $this->assertEquals(true, $customsOffice->isAllowStandings());
     $this->assertEquals(-2, $customsOffice->getStandingLevel());
     $this->assertEquals(0.01, $customsOffice->getTaxRateAlliance());
     $this->assertEquals(0.02, $customsOffice->getTaxRateCorp());
     $this->assertEquals(0.03, $customsOffice->getTaxRateStandingHigh());
     $this->assertEquals(0.04, $customsOffice->getTaxRateStandingGood());
     $this->assertEquals(0.05, $customsOffice->getTaxRateStandingNeutral());
     $this->assertEquals(0.06, $customsOffice->getTaxRateStandingBad());
     $this->assertEquals(0.07000000000000001, $customsOffice->getTaxRateStandingHorrible());
 }