我在 Unity3d 项目中有两个文件。一个是在编辑模式下运行的测试脚本。另一个是带有静态函数的单个类,我想从测试脚本中调用这些函数。
这是我的测试脚本:
using UnityEngine;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
public class NewTestScript
{
[Test]
public void TestAnotherStaticFunction()
{
int a = NewBehaviourScript.FunctionUnderTest(1);
int b = 1;
// Use the Assert class to test conditions.
Assert.IsTrue(a == b);
}
}
Run Code Online (Sandbox Code Playgroud)
这是我正在测试的功能:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
/// <summary>
/// the stupidest function in the world,
/// used to verify tests.
/// </summary>
public static int FunctionUnderTest(int a)
{
return a;
} …Run Code Online (Sandbox Code Playgroud) 我遇到了与此类似的问题。我正在尝试通过 ARM 模板部署 API 连接,但在部署时出现“ParameterNotDefined”错误。
但是,我没有创建到 azure 表的 API 连接,而是连接到 azure 队列。
我没有得到具体的答案,而是希望获得有关如何使用文档或其他方法自己回答这个问题的指导:我无法找到有关通过“MICROSOFT.WEB/CONNECTIONS”类型支持的现有 API 的文档,以及每个 API 期望您提供的相关“参数值”。
在此处搜索解决方案非常困难,因为术语非常多。这是我已经尝试过的:
在不久的将来,我将创建大量与逻辑应用程序的 API 连接,我需要一种比谷歌搜索、堆栈溢出和代码示例重用更复杂的发现方法。 我如何查看整套 API 连接,以及每个 API 连接所支持的“参数值”?