Skip to content

Commit

Permalink
Testing time
Browse files Browse the repository at this point in the history
  • Loading branch information
donkeyProgramming committed Nov 24, 2024
1 parent f5bbb30 commit e21d622
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AssetEditor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Editors.ImportExport", "Edi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.ImportExport", "Editors\ImportExportEditor\Test.ImportExport\Test.ImportExport.csproj", "{95A59789-08A8-4917-A252-B6E14BC18C6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Core.Test", "Testing\Shared.Core.Test\Shared.Core.Test.csproj", "{13904B63-D942-41A9-863D-B977B33205E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -161,6 +163,10 @@ Global
{95A59789-08A8-4917-A252-B6E14BC18C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95A59789-08A8-4917-A252-B6E14BC18C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95A59789-08A8-4917-A252-B6E14BC18C6A}.Release|Any CPU.Build.0 = Release|Any CPU
{13904B63-D942-41A9-863D-B977B33205E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13904B63-D942-41A9-863D-B977B33205E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13904B63-D942-41A9-863D-B977B33205E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13904B63-D942-41A9-863D-B977B33205E8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -190,6 +196,7 @@ Global
{3DC5AC01-2C79-484D-A9FD-4EB3F7EC4960} = {07AC615B-A8FC-4E1A-BDD5-BC11452429A0}
{0EF858E9-A17B-40E0-BBED-97F5D1A6A8D4} = {3DC5AC01-2C79-484D-A9FD-4EB3F7EC4960}
{95A59789-08A8-4917-A252-B6E14BC18C6A} = {3DC5AC01-2C79-484D-A9FD-4EB3F7EC4960}
{13904B63-D942-41A9-863D-B977B33205E8} = {18424B6A-CB8A-4CE1-935C-72459F31521B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AB5968F3-98ED-4AFF-98EA-0DBEDCACADF2}
Expand Down
12 changes: 12 additions & 0 deletions Testing/Shared.Core.Test/PackFiles/FileSaveServiceTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shared.Core.Test.PackFiles
{
internal class FileSaveServiceTests
{
}
}
12 changes: 12 additions & 0 deletions Testing/Shared.Core.Test/PackFiles/PackFileContainerLoaderTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shared.Core.Test.PackFiles
{
internal class PackFileContainerLoaderTests
{
}
}
49 changes: 49 additions & 0 deletions Testing/Shared.Core.Test/PackFiles/PackFileServiceTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Moq;
using Shared.Core.Events;
using Shared.Core.PackFiles;
using Shared.Core.PackFiles.Models;

namespace Shared.Core.Test.PackFiles
{
internal class PackFileServiceTest
{


[Test]
public void AddContainer_CaPackFile()
{
// Arrenge
var eventHub = new Mock<IGlobalEventHub>();
var pfs = new PackFileService(eventHub.Object);
var container = new PackFileContainer("MyTest");
container.SystemFilePath = "SystemPath";
container.IsCaPackFile = true;

// Act
pfs.AddContainer(container);

// Assert

}

// public void AddContainer_CaPackNotSetFile()
// public void AddContainers_Duplicate()
// public void AddContainers_NotDuplicate()



//CreateNewPackFileContainer

// AddFilesToPack

// CopyFileFromOtherPackFile

// SetEditablePack

// UnloadPackContainer

// SaveFile

// SavePackContainer
}
}
28 changes: 28 additions & 0 deletions Testing/Shared.Core.Test/Shared.Core.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Shared\SharedCore\Shared.Core.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>

</Project>
16 changes: 16 additions & 0 deletions Testing/Shared.Core.Test/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Shared.Core.Test
{
public class Tests
{
[SetUp]
public void Setup()
{
}

[Test]
public void Test1()
{
Assert.Pass();
}
}
}

0 comments on commit e21d622

Please sign in to comment.