diff options
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley')
-rw-r--r-- | src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs | 18 | ||||
-rw-r--r-- | src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs new file mode 100644 index 00000000..88723a56 --- /dev/null +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs @@ -0,0 +1,18 @@ +// ReSharper disable CheckNamespace, InconsistentNaming -- matches Stardew Valley's code +using Netcode; + +namespace StardewValley +{ + /// <summary>A simplified version of Stardew Valley's <c>StardewValley.Item</c> class for unit testing.</summary> + public class Item + { + /// <summary>A net int field with an equivalent non-net <c>Category</c> property.</summary> + public NetInt category { get; } = new NetInt { Value = 42 }; + + /// <summary>A net int field with no equivalent non-net property.</summary> + public NetInt type { get; } = new NetInt { Value = 42 }; + + /// <summary>A net reference field.</summary> + public NetRef refField { get; } = null; + } +} diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs new file mode 100644 index 00000000..498c38c1 --- /dev/null +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs @@ -0,0 +1,6 @@ +// ReSharper disable CheckNamespace -- matches Stardew Valley's code +namespace StardewValley +{ + /// <summary>A simplified version of Stardew Valley's <c>StardewValley.Object</c> class for unit testing.</summary> + public class Object : Item { } +} |