Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Fix fake data as noted in issue #10. #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Task<bool> LoginAsync(string userName, string password)
{
bool succeeded = false;

if (userName == "aaa")
if (userName.ToLower() == "aaa")
{
succeeded = true;
}
Expand Down
64 changes: 32 additions & 32 deletions src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,38 @@ public class FakeRidesService : IRidesService
{
private static List<Suggestion> suggestions = StaticData.GetSuggestions();

private static int StationsCounter = 0;
private static List<Station> stations = new List<Station>
{
new Station
{
Id = 1,
Name = "Alki Beach Park I",
Slots = 22,
Occupied = 4,
Latitude = 47.5790791f,
Longitude = -122.4136163f
},
new Station
{
Id = 2,
Name = "Alki Beach Park II",
Slots = 12,
Occupied = 7,
Latitude = 47.5743905f,
Longitude = -122.4023376f
},
new Station
{
Id = 3,
Name = "Alki Point Lighthouse",
Slots = 5,
Occupied = 15,
Latitude = 47.5766275f,
Longitude = -122.4217906f
}
};

private static List<Ride> rides = new List<Ride>
{
new Ride
Expand Down Expand Up @@ -58,38 +90,6 @@ public class FakeRidesService : IRidesService
}
};

private static int StationsCounter = 0;
private static List<Station> stations = new List<Station>
{
new Station
{
Id = 1,
Name = "Alki Beach Park I",
Slots = 22,
Occupied = 4,
Latitude = 47.5790791f,
Longitude = -122.4136163f
},
new Station
{
Id = 2,
Name = "Alki Beach Park II",
Slots = 12,
Occupied = 7,
Latitude = 47.5743905f,
Longitude = -122.4023376f
},
new Station
{
Id = 3,
Name = "Alki Point Lighthouse",
Slots = 5,
Occupied = 15,
Latitude = 47.5766275f,
Longitude = -122.4217906f
}
};

public async Task<IEnumerable<Suggestion>> GetSuggestions()
{
await Task.Delay(200);
Expand Down