Added tests and void accounts/envelopes

pull/25/head
William Lewis 4 months ago
parent ddde019173
commit 1b646745c8

@ -4,6 +4,12 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C#: <project-name> Debug",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/active-allocator/bin/Debug/net7.0/linux-x64/active-allocator.dll"
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr",

@ -0,0 +1,29 @@
namespace active_allocator.Tests;
public class AccountServiceTests
{
[Fact]
public void PassingTest()
{
// Arrange
int a = 2;
int b = 2;
// Act
int result = Add(2, 2);
// Assert
Assert.Equal(4, result);
}
[Fact]
public void FailingTest()
{
Assert.Equal(5, Add(2, 2));
}
int Add(int x, int y)
{
return x + y;
}
}

@ -0,0 +1,14 @@
public class DatabaseFixture : IDisposable
{
// Constructor: Set up your fixture.
public DatabaseFixture()
{
// Initialize your test database or any other resources.
}
// IDisposable implementation: Clean up your fixture.
public void Dispose()
{
// Dispose of or release any resources used by your fixture.
}
}

@ -0,0 +1,29 @@
namespace active_allocator.Tests;
public class MathTests
{
[Fact]
public void PassingTest()
{
// Arrange
int a = 2;
int b = 2;
// Act
int result = Add(2, 2);
// Assert
Assert.Equal(4, result);
}
[Fact]
public void FailingTest()
{
Assert.Equal(5, Add(2, 2));
}
int Add(int x, int y)
{
return x + y;
}
}

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>active_allocator.Tests</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\active-allocator\active-allocator.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,18 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.Reflection.NullabilityInfoContext.IsSupported": true
}
}
}

@ -0,0 +1,20 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.15"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.15"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.AspNetCore.SpaProxy": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

@ -0,0 +1,16 @@
{
"ConnectionStrings": {
"PSQLConnection": "Server=localhost;Port=15432;Database=aadb;User Id=postgres;Password=nqA3UV3CliLLHpLL"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"AppSettings": {
"Secret": "5de80277015f9fd564c4d1cc2cf827dbb1774cd66e7d79aa258d9c35a9f67f32fc6cf0dc24244242bd9501288e0fd69e315b"
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save