project struc changed to accomodate tests and readability

This commit is contained in:
Defrim Binakaj
2025-06-11 11:37:49 -06:00
parent 93fd3d36da
commit 851d29dbaf
68 changed files with 138 additions and 11 deletions
+10 -10
View File
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35527.113
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallMod", "WallMod.csproj", "{858683C4-6202-4EBA-897F-B0175F90C3A8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallMod", "src\WallMod\WallMod.csproj", "{4706AF42-D2D2-DF9F-11DE-01E8F345F214}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallModTest", "..\WallModTest\WallModTest.csproj", "{FA3304CD-B064-4ACD-9DCC-E53736A8143B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallModTest", "tests\WallModTest\WallModTest.csproj", "{9502F771-054A-4572-E4CA-3B830F41E085}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{858683C4-6202-4EBA-897F-B0175F90C3A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{858683C4-6202-4EBA-897F-B0175F90C3A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{858683C4-6202-4EBA-897F-B0175F90C3A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{858683C4-6202-4EBA-897F-B0175F90C3A8}.Release|Any CPU.Build.0 = Release|Any CPU
{FA3304CD-B064-4ACD-9DCC-E53736A8143B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA3304CD-B064-4ACD-9DCC-E53736A8143B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA3304CD-B064-4ACD-9DCC-E53736A8143B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA3304CD-B064-4ACD-9DCC-E53736A8143B}.Release|Any CPU.Build.0 = Release|Any CPU
{4706AF42-D2D2-DF9F-11DE-01E8F345F214}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4706AF42-D2D2-DF9F-11DE-01E8F345F214}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4706AF42-D2D2-DF9F-11DE-01E8F345F214}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4706AF42-D2D2-DF9F-11DE-01E8F345F214}.Release|Any CPU.Build.0 = Release|Any CPU
{9502F771-054A-4572-E4CA-3B830F41E085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9502F771-054A-4572-E4CA-3B830F41E085}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9502F771-054A-4572-E4CA-3B830F41E085}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9502F771-054A-4572-E4CA-3B830F41E085}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View File

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 747 B

Before

Width:  |  Height:  |  Size: 563 KiB

After

Width:  |  Height:  |  Size: 563 KiB

Before

Width:  |  Height:  |  Size: 796 KiB

After

Width:  |  Height:  |  Size: 796 KiB

Before

Width:  |  Height:  |  Size: 7.0 MiB

After

Width:  |  Height:  |  Size: 7.0 MiB

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 16 MiB

After

Width:  |  Height:  |  Size: 16 MiB

Before

Width:  |  Height:  |  Size: 671 KiB

After

Width:  |  Height:  |  Size: 671 KiB

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

@@ -306,7 +306,7 @@ public class UniversalAppStore : ViewModelBase
}
// version ===================================================
private string appNameVersion = "v0.0.11";
private string appNameVersion = "v0.0.12";
public string AppNameVersion
{
get => appNameVersion;
+10
View File
@@ -0,0 +1,10 @@
namespace WallModTest;
public class GeneralTests
{
[Fact]
public void Test1()
{
Assert.Equal(2 + 2, 4);
}
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WallMod.Helpers;
namespace WallModTest.Helpers;
public class ImageHelperTests
{
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WallMod.Helpers;
namespace WallModTest.Helpers;
public class SettingsHistoryHelperTests
{
}
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WallMod.Helpers;
namespace WallModTest.Helpers;
public class WallpaperHistoryHelperTests
{
[Fact]
public void AddToHistory_UpdatesEntries()
{
var helper = new WallpaperHistoryHelper();
var testPath = @"C:\test.jpg";
helper.AddToHistory(testPath);
var history = helper.LoadHistoryJson();
Assert.Contains(testPath, history);
}
[Fact]
public void RemoveFromHistory_UpdatesEntries()
{
var helper = new WallpaperHistoryHelper();
var testPath = @"C:\test.jpg";
helper.AddToHistory(testPath);
helper.RemoveHistoryEntry(testPath);
var history = helper.LoadHistoryJson();
Assert.DoesNotContain(testPath, history);
}
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WallMod.ViewModels;
namespace WallModTest.Integration;
public class IntegrationTests
{
}
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WallMod.Models;
using WallMod.ViewModels;
namespace WallModTest.ViewModels;
public class MainViewModelTests
{
}
+27
View File
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WallMod\WallMod.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
</Project>