diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-11 20:32:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-11 20:32:00 -0400 |
commit | b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51 (patch) | |
tree | 319498e8724137a5680186645ca8324f2949eba3 /src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs | |
parent | 46141a7af21a921284bc82d49d888da864887d6e (diff) | |
parent | 2d47e479a5e48a575db3ca9998653c0435419440 (diff) | |
download | SMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.tar.gz SMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.tar.bz2 SMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs')
-rw-r--r-- | src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs | 24 |
1 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..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>(); + } +} |