public void NonInitializedCursorThrowsInvalidOperationException() { SCursor <int, int> c = default; Assert.Throws <InvalidOperationException>(() => { c.MoveFirst(); }); Assert.Throws <InvalidOperationException>(() => { c.MoveLast(); }); Assert.Throws <InvalidOperationException>(() => { c.MoveNext(); }); Assert.Throws <InvalidOperationException>(() => { c.MovePrevious(); }); Assert.Throws <InvalidOperationException>(() => { c.Move(10, true); }); Assert.Throws <InvalidOperationException>(() => { c.Move(-10, true); }); Assert.Throws <InvalidOperationException>(() => { c.Move(10, false); }); Assert.Throws <InvalidOperationException>(() => { c.Move(-10, false); }); Assert.Throws <InvalidOperationException>(() => { c.MoveAt(10, Lookup.EQ); }); Assert.Throws <InvalidOperationException>(() => { c.Dispose(); }); Assert.AreEqual(0, c.CurrentValue); Assert.AreEqual(0, c.CurrentKey); Assert.AreEqual(CursorState.None, c.State); Assert.AreEqual(null, c.AsyncCompleter); }
public void OnCursorPositionChange(SCursor cursor) { selectedTower = gameContent.GetTower(cursor.Coordinates); UpdateRadius(); }