mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Fix tests
This commit is contained in:
parent
e63a4b812a
commit
c0ef2f107e
3 changed files with 8 additions and 9 deletions
|
@ -20,6 +20,7 @@ namespace ProjectLighthouse.Tests {
|
|||
Name = "slotA",
|
||||
Location = l,
|
||||
LocationId = l.Id,
|
||||
ResourceCollection = "",
|
||||
};
|
||||
|
||||
Slot slotB = new() {
|
||||
|
@ -27,6 +28,7 @@ namespace ProjectLighthouse.Tests {
|
|||
Name = "slotB",
|
||||
Location = l,
|
||||
LocationId = l.Id,
|
||||
ResourceCollection = "",
|
||||
};
|
||||
|
||||
database.Slots.Add(slotA);
|
||||
|
@ -43,6 +45,11 @@ namespace ProjectLighthouse.Tests {
|
|||
Assert.NotEqual(respA, respB);
|
||||
Assert.DoesNotContain(respA, "slotB");
|
||||
Assert.DoesNotContain(respB, "slotA");
|
||||
|
||||
// Cleanup
|
||||
|
||||
database.Slots.Remove(slotA);
|
||||
database.Slots.Remove(slotB);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,14 +22,6 @@ namespace ProjectLighthouse {
|
|||
MySqlServerVersion.LatestSupportedServerVersion
|
||||
);
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder) {
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<Slot>()
|
||||
.Property<string>(nameof(Slot.ResourceCollection))
|
||||
.HasField(nameof(Slot.ResourceCollection));
|
||||
}
|
||||
|
||||
public async Task<User> CreateUser(string username) {
|
||||
User user;
|
||||
if((user = await Users.Where(u => u.Username == username).FirstOrDefaultAsync()) != null)
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace ProjectLighthouse.Types {
|
|||
[XmlElement("rootLevel")]
|
||||
public string RootLevel { get; set; }
|
||||
|
||||
public string ResourceCollection;
|
||||
public string ResourceCollection { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
[XmlElement("resource")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue