From b178989f31f25b59062865511e7edf8010e95806 Mon Sep 17 00:00:00 2001 From: Brett Groshong Date: Thu, 2 Feb 2023 10:45:22 -0800 Subject: [PATCH] Delete incorrect / stale searcher tests. --- .../Tests/GraphUI/DataModel/Searcher.meta | 8 --- ...ShaderGraphSearcherDatabaseProviderTest.cs | 56 ------------------- ...rGraphSearcherDatabaseProviderTest.cs.meta | 11 ---- 3 files changed, 75 deletions(-) delete mode 100644 com.unity.sg2/Tests/GraphUI/DataModel/Searcher.meta delete mode 100644 com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs delete mode 100644 com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs.meta diff --git a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher.meta b/com.unity.sg2/Tests/GraphUI/DataModel/Searcher.meta deleted file mode 100644 index eccc217e987..00000000000 --- a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 941b8a765220e4dcf9525129f23c8619 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs b/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs deleted file mode 100644 index 7424408f390..00000000000 --- a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using NUnit.Framework; -using Unity.ItemLibrary.Editor; -using UnityEditor.ShaderGraph.GraphDelta; - -namespace UnityEditor.ShaderGraph.GraphUI.UnitTests -{ - [TestFixture] - class ShaderGraphSearcherDatabaseProviderTest - { - // TODO (Brett) Correct this test once a testable registry can be created. - //[Test] - public void GetNodeSearcherItems_Basic() - { - // make a registry - // load some node descriptors - // make a mock shader graph model - // get the list of node seacher items - // check that the display names are in the list as searcher item names - // make sure that a ItemLibraryDatabase can be made - } - - // TODO (Brett) This test is currently not being run as part of the suite - // because the "empty" registry is actually filled with 207 keys. - // TODO (Brett) Make this test correct. - //[Test] - public void GetNodeSearcherItems_WithEmptyRegistry() - { - // Setup - ShaderGraphRegistry registry = new ShaderGraphRegistry(); - SGGraphModel graphModel = new SGGraphModelMock(registry); - - // Test ItemLibraryItem list from an empty registry - var searcherItems = ShaderGraphSearcherDatabaseProvider.GetNodeSearcherItems(graphModel); - Assert.Zero(searcherItems.Count, "ItemLibraryItem list created from an empty Registry should be empty"); - - - // Test ItemLibraryDatabase creation from empty ItemLibraryItem list - Assert.DoesNotThrow(() => - { - ItemLibraryDatabase db = new(searcherItems); - }, "Should be able to create a ItemLibraryDatabase from an empty ItemLibraryItem list"); - } - - // TODO (Brett) Correct this test once a testable registry can be created. - //[Test] - public void GetNodeSearcherItems_WithDuplicates() - { - // make a registry - // add multiple node descriptors with the same display name - // make a mock shader graph model - // get the list of node seacher items - // check that the duplicated dispaly name only appears in one searcher item - // make sure that a ItemLibraryDatabase can be made - } - } -} diff --git a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs.meta b/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs.meta deleted file mode 100644 index 473554b5816..00000000000 --- a/com.unity.sg2/Tests/GraphUI/DataModel/Searcher/ShaderGraphSearcherDatabaseProviderTest.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d262b37fcbfa64b3aa0e1aae6163650a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: