public void TestUnitListsNoUnitsInStub(TroopStub stub) { stub.AddFormation(FormationType.Normal); stub.AddFormation(FormationType.Attack); var units = stub.ToUnitList(); units.Count.Should().Be(0); }
public void TestUnitListConflictingTypes(TroopStub stub) { stub.AddFormation(FormationType.Normal); stub.AddFormation(FormationType.Attack); stub.AddUnit(FormationType.Normal, 1, 4); stub.AddUnit(FormationType.Attack, 1, 5); var units = stub.ToUnitList(); Assert.True(units.Count == 1); Assert.True(units[0].Type == 1); Assert.True(units[0].Count == 9); }
public void TestUnitListSpecificFormations(TroopStub stub) { stub.AddFormation(FormationType.Normal); stub.AddFormation(FormationType.Attack); stub.AddUnit(FormationType.Normal, 1, 4); stub.AddUnit(FormationType.Attack, 1, 5); stub.AddUnit(FormationType.Attack, 2, 10); var units = stub.ToUnitList(FormationType.Attack); Assert.True(units.Count == 2); Assert.True(units[0].Type == 1); Assert.True(units[0].Count == 5); Assert.True(units[1].Type == 2); Assert.True(units[1].Count == 10); }