diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-10 18:22:34 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-10 18:22:34 -0400 |
commit | 35c2e5968579ea578cf04e7550ab43bc5a4b8074 (patch) | |
tree | e72d14fdbc81041a16d788a39a45532f5286b301 /src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley | |
parent | 9e5c3912b6cfce0348aa2d88d30a11fe5b410e9c (diff) | |
download | SMAPI-35c2e5968579ea578cf04e7550ab43bc5a4b8074.tar.gz SMAPI-35c2e5968579ea578cf04e7550ab43bc5a4b8074.tar.bz2 SMAPI-35c2e5968579ea578cf04e7550ab43bc5a4b8074.zip |
expand analyzer unit tests (#471)
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley')
-rw-r--r-- | src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs | 16 | ||||
-rw-r--r-- | src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs | 10 |
2 files changed, 19 insertions, 7 deletions
diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs index 88723a56..386767d7 100644 --- a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Item.cs @@ -7,12 +7,18 @@ namespace StardewValley 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 }; + public readonly NetInt category = 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 generic net int field with no equivalent non-net property.</summary> + public readonly NetInt netIntField = new NetInt { Value = 42 }; - /// <summary>A net reference field.</summary> - public NetRef refField { get; } = null; + /// <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 index 498c38c1..3dd66a6d 100644 --- a/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/Mock/StardewValley/Object.cs @@ -1,6 +1,12 @@ -// ReSharper disable CheckNamespace -- matches Stardew Valley's code +// 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 { } + public class Object : Item + { + /// <summary>A net int field with an equivalent non-net property.</summary> + public NetInt type = new NetInt { Value = 42 }; + } } |