public IRequirementNode this[RequirementNodeID key] { get { if (!ContainsKey(key)) { Create(key); } return(((IDictionary <RequirementNodeID, IRequirementNode>)_dictionary)[key]); } set => ((IDictionary <RequirementNodeID, IRequirementNode>)_dictionary)[key] = value;
public void Tests( ModeSaveData mode, RequirementNodeID[] accessibleNodes, RequirementNodeID id, AccessibilityLevel expected) { Mode.Instance.Load(mode); RequirementNodeDictionary.Instance.Reset(); foreach (var node in accessibleNodes) { RequirementNodeDictionary.Instance[node].AlwaysAccessible = true; } Assert.Equal(expected, RequirementNodeDictionary.Instance[id].Accessibility); }