From 6582735a2e3a0625f4f78cef5c1f84aed692a8bd Mon Sep 17 00:00:00 2001 From: Brian Runck Date: Sun, 19 Mar 2017 18:38:26 -0400 Subject: [PATCH] Fix fake data as noted in issue #10. --- .../Fake/FakeAuthenticationService.cs | 2 +- .../DataServices/Fake/FakeRidesService.cs | 64 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) mode change 100644 => 100755 src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs mode change 100644 => 100755 src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs diff --git a/src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs b/src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs old mode 100644 new mode 100755 index 20fdfa6..e7f4ace --- a/src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs +++ b/src/BikeSharing.Clients.Core/DataServices/Fake/FakeAuthenticationService.cs @@ -18,7 +18,7 @@ public Task LoginAsync(string userName, string password) { bool succeeded = false; - if (userName == "aaa") + if (userName.ToLower() == "aaa") { succeeded = true; } diff --git a/src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs b/src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs old mode 100644 new mode 100755 index 95bc409..3f1f265 --- a/src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs +++ b/src/BikeSharing.Clients.Core/DataServices/Fake/FakeRidesService.cs @@ -16,6 +16,38 @@ public class FakeRidesService : IRidesService { private static List suggestions = StaticData.GetSuggestions(); + private static int StationsCounter = 0; + private static List stations = new List + { + 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 rides = new List { new Ride @@ -58,38 +90,6 @@ public class FakeRidesService : IRidesService } }; - private static int StationsCounter = 0; - private static List stations = new List - { - 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> GetSuggestions() { await Task.Delay(200);