diff options
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley')
3 files changed, 47 insertions, 0 deletions
diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Farmer.cs b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Farmer.cs new file mode 100644 index 00000000..e0f0e30c --- /dev/null +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Farmer.cs @@ -0,0 +1,11 @@ +// ReSharper disable CheckNamespace, InconsistentNaming -- matches Stardew Valley's code +using System.Collections.Generic; + +namespace StardewValley +{ + /// <summary>A simplified version of Stardew Valley's <c>StardewValley.Farmer</c> class for unit testing.</summary> + internal class Farmer + { + public IDictionary<string, int[]> friendships; + } +} 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..386767d7 --- /dev/null +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs @@ -0,0 +1,24 @@ +// 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 readonly NetInt category = new NetInt { Value = 42 }; + + /// <summary>A generic net int field with no equivalent non-net property.</summary> + public readonly NetInt netIntField = new NetInt { Value = 42 }; + + /// <summary>A generic net ref field with no equivalent non-net property.</summary> + public readonly NetRef<object> netRefField = new NetRef<object>(); + + /// <summary>A generic net int property with no equivalent non-net property.</summary> + public NetInt netIntProperty = new NetInt { Value = 42 }; + + /// <summary>A generic net ref property with no equivalent non-net property.</summary> + public NetRef<object> netRefProperty { get; } = new NetRef<object>(); + } +} 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..3dd66a6d --- /dev/null +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs @@ -0,0 +1,12 @@ +// ReSharper disable CheckNamespace, InconsistentNaming -- matches Stardew Valley's code +using Netcode; + +namespace StardewValley +{ + /// <summary>A simplified version of Stardew Valley's <c>StardewValley.Object</c> class for unit testing.</summary> + public class Object : Item + { + /// <summary>A net int field with an equivalent non-net property.</summary> + public NetInt type = new NetInt { Value = 42 }; + } +} |