summaryrefslogtreecommitdiff
path: root/src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-16 16:59:53 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-16 16:59:53 -0400
commit20224d293d03d34860505980cabdb4bc5cf13319 (patch)
tree36e9e6da9abe939e7f84f6c42b7a4d9cb703eec3 /src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs
parent559d763756e3ccbd7feaa3b82d7924d8cd97969f (diff)
downloadSMAPI-20224d293d03d34860505980cabdb4bc5cf13319.tar.gz
SMAPI-20224d293d03d34860505980cabdb4bc5cf13319.tar.bz2
SMAPI-20224d293d03d34860505980cabdb4bc5cf13319.zip
add unit test for proxied out parameters
Diffstat (limited to 'src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs')
-rw-r--r--src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs b/src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs
index e7e1ccef..c8781da5 100644
--- a/src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs
+++ b/src/SMAPI.Tests.ModApiProvider/Framework/SimpleApi.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
+using StardewModdingAPI.Utilities;
namespace SMAPI.Tests.ModApiProvider.Framework
{
@@ -96,6 +97,20 @@ namespace SMAPI.Tests.ModApiProvider.Framework
return value;
}
+ /// <summary>A simple method which returns out parameters.</summary>
+ public bool TryGetOutParameter(int inputNumber, out int outNumber, out string outString, out PerScreen<int> outReference, out IDictionary<int, PerScreen<int>> outComplexType)
+ {
+ outNumber = inputNumber;
+ outString = inputNumber.ToString();
+ outReference = new PerScreen<int>(() => inputNumber);
+ outComplexType = new Dictionary<int, PerScreen<int>>
+ {
+ [inputNumber] = new PerScreen<int>(() => inputNumber)
+ };
+
+ return true;
+ }
+
/*********
** Helper methods