mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Common DatItem properties can never be null
This commit is contained in:
@@ -5,7 +5,6 @@ namespace SabreTools.DatFiles.Test
|
|||||||
#region RemoveHeaderFields
|
#region RemoveHeaderFields
|
||||||
|
|
||||||
// TODO: Write RemoveHeaderFields tests
|
// TODO: Write RemoveHeaderFields tests
|
||||||
// - Null header
|
|
||||||
// - Empty list
|
// - Empty list
|
||||||
// - Full list
|
// - Full list
|
||||||
|
|
||||||
@@ -14,7 +13,6 @@ namespace SabreTools.DatFiles.Test
|
|||||||
#region RemoveItemFields
|
#region RemoveItemFields
|
||||||
|
|
||||||
// TODO: Write RemoveItemFields tests
|
// TODO: Write RemoveItemFields tests
|
||||||
// - Null item dict
|
|
||||||
// - Both lists empty
|
// - Both lists empty
|
||||||
// - Machine only
|
// - Machine only
|
||||||
// - Item only
|
// - Item only
|
||||||
@@ -25,7 +23,6 @@ namespace SabreTools.DatFiles.Test
|
|||||||
#region RemoveItemFieldsDB
|
#region RemoveItemFieldsDB
|
||||||
|
|
||||||
// TODO: Write RemoveItemFieldsDB tests
|
// TODO: Write RemoveItemFieldsDB tests
|
||||||
// - Null item dict
|
|
||||||
// - Both lists empty
|
// - Both lists empty
|
||||||
// - Machine only
|
// - Machine only
|
||||||
// - Item only
|
// - Item only
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace SabreTools.DatFiles
|
|||||||
public void RemoveHeaderFields(List<string> headerFieldNames)
|
public void RemoveHeaderFields(List<string> headerFieldNames)
|
||||||
{
|
{
|
||||||
// If we have an invalid input, return
|
// If we have an invalid input, return
|
||||||
if (Header == null || headerFieldNames.Count == 0)
|
if (headerFieldNames.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var fieldName in headerFieldNames)
|
foreach (var fieldName in headerFieldNames)
|
||||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatFiles
|
|||||||
public void RemoveItemFields(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
public void RemoveItemFields(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
||||||
{
|
{
|
||||||
// If we have an invalid input, return
|
// If we have an invalid input, return
|
||||||
if (Items == null || (machineFieldNames.Count == 0 && itemFieldNames.Count == 0))
|
if (machineFieldNames.Count == 0 && itemFieldNames.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if NET452_OR_GREATER || NETCOREAPP
|
#if NET452_OR_GREATER || NETCOREAPP
|
||||||
@@ -70,7 +70,7 @@ namespace SabreTools.DatFiles
|
|||||||
public void RemoveItemFieldsDB(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
public void RemoveItemFieldsDB(List<string> machineFieldNames, Dictionary<string, List<string>> itemFieldNames)
|
||||||
{
|
{
|
||||||
// If we have an invalid input, return
|
// If we have an invalid input, return
|
||||||
if (ItemsDB == null || (machineFieldNames.Count == 0 && itemFieldNames.Count == 0))
|
if (machineFieldNames.Count == 0 && itemFieldNames.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Handle machine removals
|
// Handle machine removals
|
||||||
|
|||||||
Reference in New Issue
Block a user