mirror of
https://github.com/edgegamers/Gangs.git
synced 2025-12-06 04:42:56 -08:00
Move Mock into Impl
This commit is contained in:
@@ -6,7 +6,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GangsPlugin", "GangsPlugin\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GangsTest", "GangsTest\GangsTest.csproj", "{B1D1E7C7-BDF3-4238-9025-4FEB2B7DAB89}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mock", "Mock\Mock.csproj", "{140E1706-30E8-4440-AAA0-56E8DD32F054}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mock", "GangsImpl\Mock\Mock.csproj", "{140E1706-30E8-4440-AAA0-56E8DD32F054}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GangsImpl", "GangsImpl", "{3AB7703F-880F-4A41-96EE-B891FA888C65}"
|
||||
EndProject
|
||||
|
||||
13
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/.gitignore
generated
vendored
Normal file
13
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/.idea.Mock.iml
|
||||
/modules.xml
|
||||
/contentModel.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/encodings.xml
generated
Normal file
4
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
8
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/indexLayout.xml
generated
Normal file
8
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
6
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/vcs.xml
generated
Normal file
6
GangsImpl/Mock/.idea/.idea.Mock.dir/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -2,7 +2,7 @@
|
||||
using GangsAPI.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public static class MemoryImpl {
|
||||
public static void AddMemoryImpl(this IServiceCollection collection) {
|
||||
@@ -4,10 +4,6 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<RootNamespace>GangsImpl.Memory</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -23,6 +19,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\GangsAPI\GangsAPI.csproj" />
|
||||
<ProjectReference Include="..\GangsAPI\GangsAPI.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using GangsAPI.Data.Stat;
|
||||
using GangsAPI.Permissions;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockGang : IGang {
|
||||
public MockGang(int id, string name, ulong owner) {
|
||||
@@ -1,7 +1,7 @@
|
||||
using GangsAPI.Data.Gang;
|
||||
using GangsAPI.Services;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockGangManager : IGangManager {
|
||||
private readonly HashSet<IGang> gangs = [];
|
||||
@@ -1,6 +1,6 @@
|
||||
using GangsAPI.Permissions;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockGangRank(int rank, string name,
|
||||
IGangRank.Permissions perms = 0) : IGangRank {
|
||||
@@ -1,7 +1,7 @@
|
||||
using GangsAPI.Data.Stat;
|
||||
using GangsAPI.Services;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockInstanceStatManager(IStatManager mgr)
|
||||
: IPlayerStatManager, IGangStatManager {
|
||||
@@ -2,7 +2,7 @@
|
||||
using GangsAPI.Data.Stat;
|
||||
using GangsAPI.Permissions;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockPlayer(ulong steam) : IGangPlayer {
|
||||
public ulong Steam { get; } = steam;
|
||||
@@ -1,7 +1,7 @@
|
||||
using GangsAPI.Data.Gang;
|
||||
using GangsAPI.Services;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockPlayerManager : IPlayerManager {
|
||||
private readonly Dictionary<ulong, IGangPlayer> players = new();
|
||||
@@ -1,6 +1,6 @@
|
||||
using GangsAPI.Data.Stat;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockStat(string statId, string name, string? desc) : IStat {
|
||||
public string StatId { get; } = statId;
|
||||
@@ -1,7 +1,7 @@
|
||||
using GangsAPI.Data.Stat;
|
||||
using GangsAPI.Services;
|
||||
|
||||
namespace GangsImpl.Memory;
|
||||
namespace Mock;
|
||||
|
||||
public class MockStatManager : IStatManager {
|
||||
private readonly HashSet<IStat> cachedStats = [], backendStats = [];
|
||||
@@ -2,7 +2,7 @@
|
||||
using GenericDB;
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace GangsImpl.SQLLite;
|
||||
namespace SQLite;
|
||||
|
||||
public class SQLiteStatManager(string connectionString,
|
||||
string table = "gang_stats", bool testing = false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections;
|
||||
using GangsAPI;
|
||||
using GangsImpl.Memory;
|
||||
using Mock;
|
||||
|
||||
namespace GangsTest.GangTests;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using GangsAPI.Services;
|
||||
using GangsImpl.Memory;
|
||||
using Mock;
|
||||
|
||||
namespace GangsTest.GangTests;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using GangsAPI.Services;
|
||||
using GangsImpl.Memory;
|
||||
using Mock;
|
||||
|
||||
namespace GangsTest.GangTests;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Xunit"/>
|
||||
<!-- Disable parallelism for xunit tests -->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -29,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Mock\Mock.csproj"/>
|
||||
<ProjectReference Include="..\GangsImpl\Mock\Mock.csproj"/>
|
||||
<ProjectReference Include="..\GangsImpl\SQLite\SQLite.csproj"/>
|
||||
<ProjectReference Include="..\GangsImpl\SQL\SQL.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using GangsAPI.Services;
|
||||
using GangsImpl.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Mock;
|
||||
|
||||
namespace GangsTest;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections;
|
||||
using GangsAPI;
|
||||
using GangsImpl.Memory;
|
||||
using GangsImpl.SQLLite;
|
||||
using Mock;
|
||||
using SQLImpl;
|
||||
using SQLite;
|
||||
|
||||
namespace GangsTest.StatTests;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user