public void SetUpdateGroups_CalledOnSystemWithUnassignedGroupList_DoesNotThrowException() { Assert.DoesNotThrow( () => { _system.SetExecutionGroups(new ManagedExecutionGroup[] { ScriptableObject.CreateInstance <ManagedExecutionGroup>() }); }, "Should be able to set execution groups on a system that has an unassigned list." ); }
public FakeEnvironment(params string[] executionGroupNames) { int groupCount = executionGroupNames.Length; if (groupCount == 0) { throw new System.ArgumentException($"{nameof(FakeEnvironment)} must have at least one execution group."); } var executionGroups = new ManagedExecutionGroup[groupCount]; var groupLookup = new Dictionary <string, ManagedExecutionGroup>(groupCount); for (int i = 0; i < groupCount; i++) { var currentGroup = executionGroups[i] = ScriptableObject.CreateInstance <ManagedExecutionGroup>(); groupLookup.Add(executionGroupNames[i], currentGroup); } this.executionGroups = new ReadOnlyDictionary <string, ManagedExecutionGroup>(groupLookup); system = ScriptableObject.CreateInstance <ManagedExecutionSystem>(); system.SetExecutionGroups(executionGroups); _runtimeController = new GameObject("Runtime Controller").AddComponent <TestManagedUpdatesSceneController>(); _runtimeController.enabled = false; }