Skip to content
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
4 changes: 2 additions & 2 deletions test/RAPS/RolesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class RolesTests
/// <summary>
/// Use the _sqlLiteConnection (see RejectAddRole_WhenDuplicateRoleId() to validate unique contraints or to do create, edit, delete actions
/// </summary>
static SqliteConnection _sqlLiteConnection = new SqliteConnection("Filename=:memory:");
static DbContextOptions<RAPSContext> _sqlLiteContextOptions = new DbContextOptionsBuilder<RAPSContext>()
static readonly SqliteConnection _sqlLiteConnection = new SqliteConnection("Filename=:memory:");
static readonly DbContextOptions<RAPSContext> _sqlLiteContextOptions = new DbContextOptionsBuilder<RAPSContext>()
.UseSqlite(_sqlLiteConnection)
.Options;

Expand Down
4 changes: 2 additions & 2 deletions test/Students/EmergencyContactControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ public async Task UpdateStudentContact_ArgumentException_ReturnsValidationProble
// but in unit tests without an HttpContext it stays null — assert the body shape.
var objectResult = Assert.IsType<ObjectResult>(result.Result);
var problem = Assert.IsType<ValidationProblemDetails>(objectResult.Value);
Assert.True(problem.Errors.ContainsKey("PhoneValidation"));
Assert.Contains("Invalid phone number: 12345", problem.Errors["PhoneValidation"]);
Assert.True(problem.Errors.TryGetValue("PhoneValidation", out var phoneErrors));
Assert.Contains("Invalid phone number: 12345", phoneErrors);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ private List<object> BuildRecentCliniciansList(IEnumerable<string> mothraIds, Di
.Select(mothraId => new
{
mothraId,
fullName = personData.ContainsKey(mothraId)
? personData[mothraId].PersonDisplayFullName
fullName = personData.TryGetValue(mothraId, out var person)
? person.PersonDisplayFullName
: $"Clinician {mothraId}"
})
.OrderBy(c => c.fullName)
Expand Down
2 changes: 1 addition & 1 deletion web/Areas/Directory/Services/VMACSService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Viper.Areas.Directory.Services
{
public class VMACSService
{
private static HttpClient sharedClient = new()
private static readonly HttpClient sharedClient = new()
{
BaseAddress = new Uri("https://vmacs-vmth.vetmed.ucdavis.edu"),
};
Expand Down
Loading