public void CanAct_DefaultActions_ReturnTrue() { var subject = new BUnit(1); var noop = new NoopAction(); Assert.True(subject.CanAttemptAction(noop)); }
public void CanAct_Move_ReturnTrue() { var subject = new BUnit(); var move = new MoveAction(MoveAction.Direction.EAST); Assert.True(subject.CanAttemptAction(move)); }
public void CanAct_Attack_ReturnTrue() { var subject = new BUnit(); var attack = new AttackAction(Guid.NewGuid()); Assert.True(subject.CanAttemptAction(attack)); }
public void CanTake_SpaceForFood_ReturnTrue() { //Setup var subject = new BUnit(1); var action = new TakeAction(Guid.NewGuid()); //Act var canAct = subject.CanAttemptAction(action); //Assert Assert.True(canAct); }
public void CanGive_FoodNotOwned_ReturnFalse() { //Setup var subject = new BUnit(); var action = new GiveAction(Guid.NewGuid(), Guid.NewGuid()); //Act var canAct = subject.CanAttemptAction(action); //Assert Assert.False(canAct); }
public void CanGive_FoodOwned_ReturnTrue() { //Setup var subject = new BUnit(50); var quantity = new Random().Next(1, 50); var food = new Food(quantity, Food.FoodQuality.FAIR); var action = new GiveAction(food.Id, Guid.NewGuid()); subject.Take(food); //Act var canAct = subject.CanAttemptAction(action); //Assert Assert.True(canAct); }