public void IsProducingTest() { var u = new MyUnit(UnitType.Factory); Assert.IsFalse(u.IsProducing); Assert.IsTrue(u.IsFree); u.Produce = UnitType.Assassin; Assert.IsTrue(u.IsProducing); Assert.IsFalse(u.IsFree); u.Free(); Assert.IsFalse(u.IsMoving); Assert.IsTrue(u.IsFree); }
public void IsMovingTest() { var u = new MyUnit(UnitType.Knight); Assert.IsFalse(u.IsMoving); Assert.IsTrue(u.IsFree); u.MoveTo = new Point(2, 3); Assert.IsTrue(u.IsMoving); Assert.IsFalse(u.IsFree); u.Free(); Assert.IsFalse(u.IsMoving); Assert.IsTrue(u.IsFree); }