public void ButtonBasicUsagePasses() { var data = new ButtonFrameInputData(); var buttonName = "Fire1"; data.AddObservedButtonNames(buttonName); Assert.IsTrue(data.ContainsButton(buttonName)); data.SetButton(buttonName, InputDefines.ButtonCondition.Down); Assert.AreEqual(InputDefines.ButtonCondition.Down, data.GetButton(buttonName)); }
public void GetValuesEnumerablePasses() { var data = new ButtonFrameInputData(); var buttonNames = new string[] { "Fire1", "Fire2", "Jump", }; data.AddObservedButtonNames(buttonNames); AssertionUtils.AssertEnumerableByUnordered( buttonNames.Select(_n => (key: _n, (object)data.GetButton(_n))) , data.GetValuesEnumerable().Select(_t => (_t.Key, _t.Value.RawValue)) , "Don't match GetValuesEnumerable()..." ); }
public ValuesEnumerable(ButtonFrameInputData target) { _target = target; }