mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add skeleton DatFiles test project
This commit is contained in:
149
SabreTools.DatFiles.Test/DatFileTests.cs
Normal file
149
SabreTools.DatFiles.Test/DatFileTests.cs
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
namespace SabreTools.DatFiles.Test
|
||||||
|
{
|
||||||
|
public class DatFileTests
|
||||||
|
{
|
||||||
|
#region Constructor
|
||||||
|
|
||||||
|
// TODO: Write Constructor tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region FillHeaderFromPath
|
||||||
|
|
||||||
|
// TODO: Write FillHeaderFromPath tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ResetDictionary
|
||||||
|
|
||||||
|
// TODO: Write ResetDictionary tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SetHeader
|
||||||
|
|
||||||
|
// TODO: Write SetHeader tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ExecuteFilters
|
||||||
|
|
||||||
|
// TODO: Write ExecuteFilters tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ParseFile
|
||||||
|
|
||||||
|
// TODO: Write ParseFile tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ParseAddHelper
|
||||||
|
|
||||||
|
// TODO: Write ParseAddHelper tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ParseAddHelperDB
|
||||||
|
|
||||||
|
// TODO: Write ParseAddHelperDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region WriteToFile
|
||||||
|
|
||||||
|
// TODO: Write WriteToFile tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region WriteToFileDB
|
||||||
|
|
||||||
|
// TODO: Write WriteToFileDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region CreatePrefixPostfix
|
||||||
|
|
||||||
|
// TODO: Write CreatePrefixPostfix tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region CreatePrefixPostfixDB
|
||||||
|
|
||||||
|
// TODO: Write CreatePrefixPostfixDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ProcessItemName
|
||||||
|
|
||||||
|
// TODO: Write ProcessItemName tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ProcessItemNameDB
|
||||||
|
|
||||||
|
// TODO: Write ProcessItemNameDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ProcessNullifiedItem
|
||||||
|
|
||||||
|
// TODO: Write ProcessNullifiedItem tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ProcessNullifiedItemDB
|
||||||
|
|
||||||
|
// TODO: Write ProcessNullifiedItemDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region GetSupportedTypes
|
||||||
|
|
||||||
|
// TODO: Write GetSupportedTypes tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region GetMissingRequiredFields
|
||||||
|
|
||||||
|
// TODO: Write GetMissingRequiredFields tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ContainsWritable
|
||||||
|
|
||||||
|
// TODO: Write ContainsWritable tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ContainsWritableDB
|
||||||
|
|
||||||
|
// TODO: Write ContainsWritableDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ResolveNames
|
||||||
|
|
||||||
|
// TODO: Write ResolveNames tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ResolveNamesDB
|
||||||
|
|
||||||
|
// TODO: Write ResolveNamesDB tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ShouldIgnore
|
||||||
|
|
||||||
|
// TODO: Write ShouldIgnore tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region GetDuplicateSuffix
|
||||||
|
|
||||||
|
// TODO: Write GetDuplicateSuffix tests
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
30
SabreTools.DatFiles.Test/SabreTools.DatFiles.Test.csproj
Normal file
30
SabreTools.DatFiles.Test/SabreTools.DatFiles.Test.csproj
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\SabreTools.Core\SabreTools.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\SabreTools.DatFiles\SabreTools.DatFiles.csproj" />
|
||||||
|
<ProjectReference Include="..\SabreTools.DatItems\SabreTools.DatItems.csproj" />
|
||||||
|
<ProjectReference Include="..\SabreTools.FileTypes\SabreTools.FileTypes.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="6.0.3">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||||
|
<PackageReference Include="xunit" Version="2.9.2" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -61,7 +61,7 @@ namespace SabreTools.DatFiles
|
|||||||
_logger = new Logger(this);
|
_logger = new Logger(this);
|
||||||
if (datFile != null)
|
if (datFile != null)
|
||||||
{
|
{
|
||||||
Header = datFile.Header;
|
Header = (DatHeader)datFile.Header.Clone();
|
||||||
Items = datFile.Items;
|
Items = datFile.Items;
|
||||||
ItemsDB = datFile.ItemsDB;
|
ItemsDB = datFile.ItemsDB;
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ namespace SabreTools.DatFiles
|
|||||||
/// <param name="datHeader">Replacement header to be used</param>
|
/// <param name="datHeader">Replacement header to be used</param>
|
||||||
public void SetHeader(DatHeader datHeader)
|
public void SetHeader(DatHeader datHeader)
|
||||||
{
|
{
|
||||||
Header = (DatHeader)datHeader.Clone();;
|
Header = (DatHeader)datHeader.Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -680,6 +680,7 @@ namespace SabreTools.DatFiles
|
|||||||
/// Get supported types for write
|
/// Get supported types for write
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>List of supported types for writing</returns>
|
/// <returns>List of supported types for writing</returns>
|
||||||
|
/// TODO: Make this into a property instead of a method
|
||||||
protected virtual ItemType[] GetSupportedTypes()
|
protected virtual ItemType[] GetSupportedTypes()
|
||||||
{
|
{
|
||||||
return Enum.GetValues(typeof(ItemType)) as ItemType[] ?? [];
|
return Enum.GetValues(typeof(ItemType)) as ItemType[] ?? [];
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.FileTypes.Test",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.DatItems.Test", "SabreTools.DatItems.Test\SabreTools.DatItems.Test.csproj", "{5BB75FB7-D9D0-493D-AF31-A371882A44A4}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.DatItems.Test", "SabreTools.DatItems.Test\SabreTools.DatItems.Test.csproj", "{5BB75FB7-D9D0-493D-AF31-A371882A44A4}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.DatFiles.Test", "SabreTools.DatFiles.Test\SabreTools.DatFiles.Test.csproj", "{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -138,6 +140,14 @@ Global
|
|||||||
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|x64.ActiveCfg = Release|Any CPU
|
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|x64.Build.0 = Release|Any CPU
|
{5BB75FB7-D9D0-493D-AF31-A371882A44A4}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{5492C6EA-02CD-4862-80A8-A4971EAEE8E3}.Release|x64.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user