mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-15 14:12:27 +00:00
Cleanup code
This commit is contained in:
parent
8ad04860ee
commit
685f57fd28
4 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -8,6 +9,7 @@ using ProjectLighthouse.Serialization;
|
||||||
using ProjectLighthouse.Types;
|
using ProjectLighthouse.Types;
|
||||||
|
|
||||||
namespace ProjectLighthouse.Tests {
|
namespace ProjectLighthouse.Tests {
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
public class LighthouseTest {
|
public class LighthouseTest {
|
||||||
public readonly TestServer Server;
|
public readonly TestServer Server;
|
||||||
public readonly HttpClient Client;
|
public readonly HttpClient Client;
|
||||||
|
|
|
@ -4,11 +4,10 @@ using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ProjectLighthouse.Types;
|
using ProjectLighthouse.Types;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
|
||||||
|
|
||||||
namespace ProjectLighthouse.Tests {
|
namespace ProjectLighthouse.Tests {
|
||||||
public class MatchTests : LighthouseTest {
|
public class MatchTests : LighthouseTest {
|
||||||
private static SemaphoreSlim semaphore = new(1, 1);
|
private static readonly SemaphoreSlim semaphore = new(1, 1);
|
||||||
|
|
||||||
[DatabaseFact]
|
[DatabaseFact]
|
||||||
public async Task ShouldReturnOk() {
|
public async Task ShouldReturnOk() {
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace ProjectLighthouse {
|
||||||
this.Locations.Add(l); // add to table
|
this.Locations.Add(l); // add to table
|
||||||
await this.SaveChangesAsync(); // saving to the database returns the id and sets it on this entity
|
await this.SaveChangesAsync(); // saving to the database returns the id and sets it on this entity
|
||||||
|
|
||||||
user = new() {
|
user = new User {
|
||||||
Username = username,
|
Username = username,
|
||||||
LocationId = l.Id,
|
LocationId = l.Id,
|
||||||
Biography = username + " hasn't introduced themselves yet.",
|
Biography = username + " hasn't introduced themselves yet.",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ProjectLighthouse.Helpers {
|
namespace ProjectLighthouse.Helpers {
|
||||||
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
public static class HashHelper {
|
public static class HashHelper {
|
||||||
// private static readonly SHA1 sha1 = SHA1.Create();
|
// private static readonly SHA1 sha1 = SHA1.Create();
|
||||||
private static readonly SHA256 sha256 = SHA256.Create();
|
private static readonly SHA256 sha256 = SHA256.Create();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue