summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-10 18:22:16 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-10 18:22:16 -0400
commit9e5c3912b6cfce0348aa2d88d30a11fe5b410e9c (patch)
treed23f9eba41b26a379135b9cb9091c16c2537579f /src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs
parent971ed1a17559064ee0ee42a83e786b3e3076059f (diff)
downloadSMAPI-9e5c3912b6cfce0348aa2d88d30a11fe5b410e9c.tar.gz
SMAPI-9e5c3912b6cfce0348aa2d88d30a11fe5b410e9c.tar.bz2
SMAPI-9e5c3912b6cfce0348aa2d88d30a11fe5b410e9c.zip
move mock classes out of sample code (#471)
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs')
-rw-r--r--src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs18
1 files changed, 18 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;
+ }
+}