From db22b1125f09ec54fb47ab95265b5f212efa646c Mon Sep 17 00:00:00 2001 From: Andre Mitchell Date: Sun, 7 Nov 2021 11:47:30 -0500 Subject: [PATCH] Update GraphModelIntegrationTests's GetNodesFromGraphNodeIds test to reflect new behavior of the function. GetNodesFromGraphNodeIds no longer adds null pointers to the list it returns, so the test was updated to reflect that only one item - the valid item - should be returned from the function. Signed-off-by: Andre Mitchell --- Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp b/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp index 683442a34e..cf110c05cb 100644 --- a/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp +++ b/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp @@ -173,16 +173,11 @@ namespace GraphModelIntegrationTest }; GraphModel::NodePtrList retrievedNodes; GraphModelIntegration::GraphControllerRequestBus::EventResult(retrievedNodes, m_sceneId, &GraphModelIntegration::GraphControllerRequests::GetNodesFromGraphNodeIds, nodeIds); - EXPECT_EQ(nodeIds.size(), retrievedNodes.size()); + // Test that only one node was found. + EXPECT_EQ(retrievedNodes.size(), 1); // Test the first node in the list should be our valid test node EXPECT_EQ(retrievedNodes[0], testNode); - - // Test the second node should be a nullptr since it was an invalid NodeId - EXPECT_EQ(retrievedNodes[1], nullptr); - - // Test the third node should also be a nullptr since it was a valid NodeId but one that doesn't exist in the scene - EXPECT_EQ(retrievedNodes[2], nullptr); } TEST_F(GraphModelIntegrationTests, ExtendableSlotsWithDifferentMinimumValues)