Skip to content

Commit

Permalink
Fix tests to account for new data on sample TripPin service.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderly committed Jul 29, 2024
1 parent 2e9a4ba commit 83bc9d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/ODataClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testODataClientSkipToken()
$this->assertEquals($pageSize, $page2results->count());
}

$lastPageSize = 4;
$lastPageSize = 5;
if ($page2skiptoken) {
$page3response = $odataClient->from('People')->skiptoken($page2skiptoken)->get()->first();
$page3results = collect($page3response->getResponseAsObject(Entity::class));
Expand Down Expand Up @@ -157,7 +157,7 @@ public function testODataClientCursorCountShouldEqualTotalEntitySetCount()

$data = $odataClient->from('People')->pageSize($pageSize)->cursor();

$expectedCount = 20;
$expectedCount = 21;

$this->assertEquals($expectedCount, $data->count());
}
Expand Down Expand Up @@ -196,7 +196,7 @@ public function testODataClientCursorLastShouldReturnEntityKristaKemp()

$last = $data->last();
$this->assertInstanceOf(Entity::class, $last);
$this->assertEquals('kristakemp', $last->UserName);
$this->assertEquals('Seymour', $last->UserName);
}

public function testODataClientCursorSkip1FirstShouldReturnEntityScottKetchum()
Expand Down Expand Up @@ -273,7 +273,7 @@ public function testODataClientCursorSkip16LastPageShouldBe4Records()
$data = $odataClient->from('People')->pageSize($pageSize)->cursor();

$lastPage = $data->skip(16);
$lastPageSize = 4;
$lastPageSize = 5;
$this->assertEquals($lastPageSize, count($lastPage->toArray()));
}

Expand All @@ -285,7 +285,7 @@ public function testODataClientCursorIteratingShouldReturnAll20Entities()

$data = $odataClient->from('People')->pageSize($pageSize)->cursor();

$expectedCount = 20;
$expectedCount = 21;
$counter = 0;

$data->each(function ($person) use(&$counter) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function testEntitySetCount()

$entitySet = 'People';

$expected = 20;
$expected = 21;

$actual = $builder->from($entitySet)->count();

Expand Down

0 comments on commit 83bc9d5

Please sign in to comment.