Skip to content

Commit

Permalink
SonarCloud fixups (phase 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Sep 16, 2022
1 parent bec012d commit 9c3502a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/FlightRecorder.Tests/AircraftManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task ListAllAsyncTest()
List<Aircraft> aircraft = await _factory.Aircraft
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, aircraft.Count());
Assert.AreEqual(1, aircraft.Count);
Assert.AreEqual(Registration, aircraft.First().Registration);
Assert.AreEqual(ModelName, aircraft.First().Model.Name);
Assert.AreEqual(ManufacturerName, aircraft.First().Model.Manufacturer.Name);
Expand All @@ -116,7 +116,7 @@ public async Task FilteredListAsyncTest()
List<Aircraft> aircraft = await _factory.Aircraft
.ListAsync(e => e.Registration == Registration, 1, 100)
.ToListAsync();
Assert.AreEqual(1, aircraft.Count());
Assert.AreEqual(1, aircraft.Count);
Assert.AreEqual(Registration, aircraft.First().Registration);
Assert.AreEqual(ModelName, aircraft.First().Model.Name);
Assert.AreEqual(ManufacturerName, aircraft.First().Model.Manufacturer.Name);
Expand All @@ -138,7 +138,7 @@ public async Task FilterByModelAsyncTest()
IAsyncEnumerable<Aircraft> matches = await _factory.Aircraft
.ListByModelAsync(ModelName, 1, 100);
List<Aircraft> aircraft = await matches.ToListAsync();
Assert.AreEqual(1, aircraft.Count());
Assert.AreEqual(1, aircraft.Count);
Assert.AreEqual(Registration, aircraft.First().Registration);
Assert.AreEqual(ModelName, aircraft.First().Model.Name);
Assert.AreEqual(ManufacturerName, aircraft.First().Model.Manufacturer.Name);
Expand All @@ -160,7 +160,7 @@ public async Task FilterByManufacturerAsyncTest()
IAsyncEnumerable<Aircraft> matches = await _factory.Aircraft
.ListByManufacturerAsync(ManufacturerName, 1, 100);
List<Aircraft> aircraft = await matches.ToListAsync();
Assert.AreEqual(1, aircraft.Count());
Assert.AreEqual(1, aircraft.Count);
Assert.AreEqual(Registration, aircraft.First().Registration);
Assert.AreEqual(ModelName, aircraft.First().Model.Name);
Assert.AreEqual(ManufacturerName, aircraft.First().Model.Manufacturer.Name);
Expand Down
4 changes: 2 additions & 2 deletions src/FlightRecorder.Tests/AirlineManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async Task ListAllAsyncTest()
List<Airline> entities = await _factory.Airlines
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand All @@ -90,7 +90,7 @@ public async Task FilteredListAsyncTest()
List<Airline> entities = await _factory.Airlines
.ListAsync(e => e.Name == EntityName, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand Down
6 changes: 3 additions & 3 deletions src/FlightRecorder.Tests/FlightManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public async Task ListAllAsyncTest()
List<Flight> flights = await _factory.Flights
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, flights.Count());
Assert.AreEqual(1, flights.Count);
Assert.AreEqual(FlightNumber, flights.First().Number);
Assert.AreEqual(AirlineName, flights.First().Airline.Name);
}
Expand All @@ -112,7 +112,7 @@ public async Task FilteredListAsyncTest()
List<Flight> flights = await _factory.Flights
.ListAsync(e => e.Number == FlightNumber, 1, 100)
.ToListAsync();
Assert.AreEqual(1, flights.Count());
Assert.AreEqual(1, flights.Count);
Assert.AreEqual(FlightNumber, flights.First().Number);
Assert.AreEqual(AirlineName, flights.First().Airline.Name);
}
Expand All @@ -139,7 +139,7 @@ public async Task ListByAirlineAsyncTest()
IAsyncEnumerable<Flight> matches = await _factory.Flights
.ListByAirlineAsync(AirlineName, 1, 100);
List<Flight> flights = await matches.ToListAsync();
Assert.AreEqual(1, flights.Count());
Assert.AreEqual(1, flights.Count);
Assert.AreEqual(FlightNumber, flights.First().Number);
Assert.AreEqual(AirlineName, flights.First().Airline.Name);
}
Expand Down
4 changes: 2 additions & 2 deletions src/FlightRecorder.Tests/LocationManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public async Task ListAllAsyncTest()
List<Location> entities = await _factory.Locations
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand All @@ -89,7 +89,7 @@ public async Task FilteredListAsyncTest()
List<Location> entities = await _factory.Locations
.ListAsync(e => e.Name == EntityName, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand Down
4 changes: 2 additions & 2 deletions src/FlightRecorder.Tests/ManufacturerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public async Task ListAllAsyncTest()
List<Manufacturer> entities = await _factory.Manufacturers
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand All @@ -94,7 +94,7 @@ public async Task FilteredListAsyncTest()
List<Manufacturer> entities = await _factory.Manufacturers
.ListAsync(e => e.Name == EntityName, 1, 100)
.ToListAsync();
Assert.AreEqual(1, entities.Count());
Assert.AreEqual(1, entities.Count);
Assert.AreEqual(EntityName, entities.First().Name);
}

Expand Down
6 changes: 3 additions & 3 deletions src/FlightRecorder.Tests/ModelManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public async Task ListAllAsyncTest()
List<Model> models = await _factory.Models
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, models.Count());
Assert.AreEqual(1, models.Count);
Assert.AreEqual(ModelName, models.First().Name);
Assert.AreEqual(ManufacturerName, models.First().Manufacturer.Name);
}
Expand All @@ -105,7 +105,7 @@ public async Task FilteredListAsyncTest()
List<Model> models = await _factory.Models
.ListAsync(e => e.Name == ModelName, 1, 100)
.ToListAsync();
Assert.AreEqual(1, models.Count());
Assert.AreEqual(1, models.Count);
Assert.AreEqual(ModelName, models.First().Name);
Assert.AreEqual(ManufacturerName, models.First().Manufacturer.Name);
}
Expand All @@ -132,7 +132,7 @@ public async Task ListByManufacturerAsyncTest()
List<Model> models = await _factory.Models
.ListByManufacturerAsync(ManufacturerName, 1, 100)
.ToListAsync();
Assert.AreEqual(1, models.Count());
Assert.AreEqual(1, models.Count);
Assert.AreEqual(ModelName, models.First().Name);
Assert.AreEqual(ManufacturerName, models.First().Manufacturer.Name);
}
Expand Down
8 changes: 4 additions & 4 deletions src/FlightRecorder.Tests/SightingManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public async Task ListAllAsyncTest()
List<Sighting> sightings = await _factory.Sightings
.ListAsync(null, 1, 100)
.ToListAsync();
Assert.AreEqual(1, sightings.Count());
Assert.AreEqual(1, sightings.Count);
Assert.AreEqual(_sightingId, sightings.First().Id);
}

Expand All @@ -159,7 +159,7 @@ public async Task ListByAircraftAsyncTest()
IAsyncEnumerable<Sighting> matches = await _factory.Sightings
.ListByAircraftAsync(Registration, 1, 100);
List<Sighting> sightings = await matches.ToListAsync();
Assert.AreEqual(1, sightings.Count());
Assert.AreEqual(1, sightings.Count);
Assert.AreEqual(_sightingId, sightings.First().Id);
}

Expand Down Expand Up @@ -192,7 +192,7 @@ public async Task ListByRouteAsyncTest()
IAsyncEnumerable<Sighting> matches = await _factory.Sightings
.ListByRouteAsync(Embarkation, Destination, 1, 100);
List<Sighting> sightings = await matches.ToListAsync();
Assert.AreEqual(1, sightings.Count());
Assert.AreEqual(1, sightings.Count);
Assert.AreEqual(_sightingId, sightings.First().Id);
}

Expand Down Expand Up @@ -225,7 +225,7 @@ public async Task ListByAirlineAsyncTest()
IAsyncEnumerable<Sighting> matches = await _factory.Sightings
.ListByAirlineAsync(AirlineName, 1, 100);
List<Sighting> sightings = await matches.ToListAsync();
Assert.AreEqual(1, sightings.Count());
Assert.AreEqual(1, sightings.Count);
Assert.AreEqual(_sightingId, sightings.First().Id);
}

Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/UserManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void GetAllUsersTest()
public async Task GetAllUsersAsyncTest()
{
List<User> users = await _factory.Users.GetUsersAsync().ToListAsync();
Assert.AreEqual(1, users.Count());
Assert.AreEqual(1, users.Count);
Assert.AreEqual(UserName, _factory.Context.Users.First().UserName);
Assert.AreNotEqual(Password, _factory.Context.Users.First().Password);
}
Expand Down

0 comments on commit 9c3502a

Please sign in to comment.