您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

48 行
1.2 KiB

using NUnit.Framework;
using UnityEngine;
using UnityEngine.Experimental.Perception.Randomization.Parameters;
namespace RandomizationTests.ParameterTests
{
[TestFixture]
public class GenericParameterTests
{
GameObject m_TestObject;
Parameter[] m_Parameters;
[SetUp]
public void Setup()
{
m_TestObject = new GameObject();
m_Parameters = new Parameter[]
{
new BooleanParameter(),
new IntegerParameter(),
new FloatParameter(),
new Vector2Parameter(),
new Vector3Parameter(),
new Vector4Parameter(),
new ColorHsvaParameter(),
new StringParameter(),
new MaterialParameter()
};
}
[TearDown]
public void TearDown()
{
Object.DestroyImmediate(m_TestObject);
}
[Test]
public void NullSamplersTest()
{
foreach (var parameter in m_Parameters)
{
foreach (var sampler in parameter.samplers)
Assert.NotNull(sampler);
}
}
}
}