Browse Source

Fixed serialization test

flabbet 1 năm trước cách đây
mục cha
commit
5b34ffb381

+ 2 - 1
tests/PixiEditor.Backend.Tests/NodeSystemTests.cs

@@ -129,7 +129,7 @@ public class NodeSystemTests
         
         
         foreach (var factoryType in allFoundFactories)
         foreach (var factoryType in allFoundFactories)
         {
         {
-            var factory = (SerializationFactory)Activator.CreateInstance(factoryType, config);
+            var factory = (SerializationFactory)Activator.CreateInstance(factoryType);
             factories.Add(factory);
             factories.Add(factory);
         }
         }
 
 
@@ -142,6 +142,7 @@ public class NodeSystemTests
 
 
             foreach (var input in node.InputProperties)
             foreach (var input in node.InputProperties)
             {
             {
+                if (input.ValueType.IsAssignableTo(typeof(Delegate))) continue;
                 bool hasFactory = factories.Any(x => x.OriginalType == input.ValueType);
                 bool hasFactory = factories.Any(x => x.OriginalType == input.ValueType);
                 Assert.True(
                 Assert.True(
                     input.ValueType.IsValueType || input.ValueType == typeof(string) || hasFactory, 
                     input.ValueType.IsValueType || input.ValueType == typeof(string) || hasFactory,