Skip to content

Commit

Permalink
SonarCloud fixups (phase 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Sep 16, 2022
1 parent 2eb3075 commit bec012d
Show file tree
Hide file tree
Showing 12 changed files with 291 additions and 291 deletions.
4 changes: 2 additions & 2 deletions src/FlightRecorder.BusinessLogic/Logic/UserManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public async Task DeleteUserAsync(string userName)
/// <param name="user"></param>
/// <param name="userId"></param>
[ExcludeFromCodeCoverage]
private void ThrowIfUserNotFound(User user, object userId)
private static void ThrowIfUserNotFound(User user, object userId)
{
if (user == null)
{
Expand All @@ -230,7 +230,7 @@ private void ThrowIfUserNotFound(User user, object userId)
/// <param name="user"></param>
/// <param name="userId"></param>
[ExcludeFromCodeCoverage]
private void ThrowIfUserFound(User user, object userId)
private static void ThrowIfUserFound(User user, object userId)
{
if (user != null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Data/FlightRecorderDbContextFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public FlightRecorderDbContext CreateDbContext(string[] args)
/// Create an in-memory context for unit testing
/// </summary>
/// <returns></returns>
public FlightRecorderDbContext CreateInMemoryDbContext()
public static FlightRecorderDbContext CreateInMemoryDbContext()
{
var optionsBuilder = new DbContextOptionsBuilder<FlightRecorderDbContext>();
optionsBuilder.UseInMemoryDatabase(Guid.NewGuid().ToString());
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Manager/Logic/CommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Operation ParseCommandLine(string[] args)
/// </summary>
/// <param name="op"></param>
/// <param name="args"></param>
private void AssignOperationParameters(Operation op, string[] args)
private static void AssignOperationParameters(Operation op, string[] args)
{
switch (op.Type)
{
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/AircraftManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class AircraftManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Aircraft.Add(Registration, SerialNumber, YearOfManufacture, ModelName, ManufacturerName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/AirlineManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class AirlineManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Airlines.Add(EntityName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/DataExchangeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class DataExchangeTests
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_sightingId = _factory.Sightings.Add(new FlattenedSighting
{
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/FlightManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class FlightManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Flights.Add(FlightNumber, Embarkation, Destination, AirlineName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/LocationManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class LocationManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Locations.Add(EntityName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/ManufacturerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ManufacturerManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Manufacturers.Add(EntityName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Tests/ModelManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ModelManagerTest
[TestInitialize]
public void TestInitialize()
{
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateInMemoryDbContext();
FlightRecorderDbContext context = FlightRecorderDbContextFactory.CreateInMemoryDbContext();
_factory = new FlightRecorderFactory(context);
_factory.Models.Add(ModelName, ManufacturerName);
}
Expand Down
Loading

0 comments on commit bec012d

Please sign in to comment.