From e21d62217a2cb6b5b15b021a1acad7317125e858 Mon Sep 17 00:00:00 2001 From: ole kristian homelien Date: Sun, 24 Nov 2024 19:47:30 +0100 Subject: [PATCH] Testing time --- AssetEditor.sln | 7 +++ .../PackFiles/FileSaveServiceTests.cs | 12 +++++ .../PackFiles/PackFileContainerLoaderTests.cs | 12 +++++ .../PackFiles/PackFileServiceTest.cs | 49 +++++++++++++++++++ .../Shared.Core.Test/Shared.Core.Test.csproj | 28 +++++++++++ Testing/Shared.Core.Test/UnitTest1.cs | 16 ++++++ 6 files changed, 124 insertions(+) create mode 100644 Testing/Shared.Core.Test/PackFiles/FileSaveServiceTests.cs create mode 100644 Testing/Shared.Core.Test/PackFiles/PackFileContainerLoaderTests.cs create mode 100644 Testing/Shared.Core.Test/PackFiles/PackFileServiceTest.cs create mode 100644 Testing/Shared.Core.Test/Shared.Core.Test.csproj create mode 100644 Testing/Shared.Core.Test/UnitTest1.cs diff --git a/AssetEditor.sln b/AssetEditor.sln index 4626ae08..a39fe4c4 100644 --- a/AssetEditor.sln +++ b/AssetEditor.sln @@ -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 @@ -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 @@ -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} diff --git a/Testing/Shared.Core.Test/PackFiles/FileSaveServiceTests.cs b/Testing/Shared.Core.Test/PackFiles/FileSaveServiceTests.cs new file mode 100644 index 00000000..7af42ecf --- /dev/null +++ b/Testing/Shared.Core.Test/PackFiles/FileSaveServiceTests.cs @@ -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 + { + } +} diff --git a/Testing/Shared.Core.Test/PackFiles/PackFileContainerLoaderTests.cs b/Testing/Shared.Core.Test/PackFiles/PackFileContainerLoaderTests.cs new file mode 100644 index 00000000..5826ada2 --- /dev/null +++ b/Testing/Shared.Core.Test/PackFiles/PackFileContainerLoaderTests.cs @@ -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 + { + } +} diff --git a/Testing/Shared.Core.Test/PackFiles/PackFileServiceTest.cs b/Testing/Shared.Core.Test/PackFiles/PackFileServiceTest.cs new file mode 100644 index 00000000..8448f694 --- /dev/null +++ b/Testing/Shared.Core.Test/PackFiles/PackFileServiceTest.cs @@ -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(); + 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 + } +} diff --git a/Testing/Shared.Core.Test/Shared.Core.Test.csproj b/Testing/Shared.Core.Test/Shared.Core.Test.csproj new file mode 100644 index 00000000..e1d5947e --- /dev/null +++ b/Testing/Shared.Core.Test/Shared.Core.Test.csproj @@ -0,0 +1,28 @@ + + + + net9.0-windows + latest + enable + enable + false + + + + + + + + + + + + + + + + + + + + diff --git a/Testing/Shared.Core.Test/UnitTest1.cs b/Testing/Shared.Core.Test/UnitTest1.cs new file mode 100644 index 00000000..70d22eb6 --- /dev/null +++ b/Testing/Shared.Core.Test/UnitTest1.cs @@ -0,0 +1,16 @@ +namespace Shared.Core.Test +{ + public class Tests + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Test1() + { + Assert.Pass(); + } + } +}