mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix File unit tests
This commit is contained in:
@@ -29,6 +29,8 @@ namespace SabreTools.DatItems.Test.Formats
|
|||||||
file.SetFieldValue(DatItem.MachineKey, machine);
|
file.SetFieldValue(DatItem.MachineKey, machine);
|
||||||
file.SetFieldValue(DatItem.RemoveKey, (bool?)false);
|
file.SetFieldValue(DatItem.RemoveKey, (bool?)false);
|
||||||
file.SetFieldValue(DatItem.SourceKey, source);
|
file.SetFieldValue(DatItem.SourceKey, source);
|
||||||
|
file.SetFieldValue<Machine>(DatItem.MachineKey, machine);
|
||||||
|
file.SetFieldValue<Source>(DatItem.SourceKey, source);
|
||||||
|
|
||||||
Rom actual = file.ConvertToRom();
|
Rom actual = file.ConvertToRom();
|
||||||
|
|
||||||
|
|||||||
@@ -106,19 +106,19 @@ namespace SabreTools.DatItems
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Machine if available, null otherwise</returns>
|
/// <returns>Machine if available, null otherwise</returns>
|
||||||
/// <remarks>Relies on <see cref="MachineKey"/></remarks>
|
/// <remarks>Relies on <see cref="MachineKey"/></remarks>
|
||||||
public virtual Machine? GetMachine() => null;
|
public Machine? GetMachine() => _internal.Read<Machine>(MachineKey);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name to use for a DatItem
|
/// Gets the name to use for a DatItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Name if available, null otherwise</returns>
|
/// <returns>Name if available, null otherwise</returns>
|
||||||
public virtual string? GetName() => null;
|
public virtual string? GetName() => _internal.GetName();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the name to use for a DatItem
|
/// Sets the name to use for a DatItem
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">Name to set for the item</param>
|
/// <param name="name">Name to set for the item</param>
|
||||||
public virtual void SetName(string? name) { }
|
public virtual void SetName(string? name) => _internal.SetName(name);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -368,19 +368,6 @@ namespace SabreTools.DatItems
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Accessors
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public override Machine? GetMachine() => _internal.Read<Machine>(MachineKey);
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public override string? GetName() => _internal.GetName();
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public override void SetName(string? name) => _internal.SetName(name);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Cloning Methods
|
#region Cloning Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user