浏览代码

Fix SerializableGraphTests

/main
Peter Bay Bastian 7 年前
当前提交
562e71c8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/UnitTests/SerializedGraphTests.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/UnitTests/SerializedGraphTests.cs


Assert.AreEqual(6, node.GetSlots<ISlot>().Count());
Assert.IsNotNull(node.GetSlotReference(TestableNode.Input0));
Assert.IsNotNull(node.GetSlotReference(TestableNode.Output0));
Assert.Null(node.GetSlotReference(555));
Assert.Throws<ArgumentException>(() => node.GetSlotReference(555));
}
[Test]

Assert.AreEqual(1, graph.GetEdges(inputNode.GetSlotReference(TestableNode.Input0)).Count());
Assert.AreEqual(1, graph.GetEdges(outputNode.GetSlotReference(TestableNode.Output0)).Count());
Assert.AreEqual(0, graph.GetEdges(outputNode.GetSlotReference(666)).Count());
Assert.Throws<ArgumentException>(() => outputNode.GetSlotReference(666));
}
[Test]

正在加载...
取消
保存