コード例 #1
0
            public void PlacesLinemanInCorrectLocations()
            {
                FormationPlacer formationPlacer  = new FormationPlacer(fakePlacementRuleFactory);
                Location        expectedLocation = new Location(0, 0);

                PlacedFormation placedFormation    = formationPlacer.ToPlacedFormation(formation);
                bool            inExpectedLocation = placedFormation.center.location == expectedLocation;

                Assert.True(inExpectedLocation);
            }
コード例 #2
0
            public void PlacesTacklesInCorrectLocation()
            {
                FormationPlacer formationPlacer             = new FormationPlacer(fakePlacementRuleFactory);
                Location        expectedLeftTackleLocation  = new Location(-8, 0);
                Location        expectedRightTackleLocation = new Location(8, 0);

                PlacedFormation placedFormation = formationPlacer.ToPlacedFormation(formation);
                bool            leftTackleInExpectedLocation  = placedFormation.leftTackle.location == expectedLeftTackleLocation;
                bool            rightTackleInExpectedLocation = placedFormation.rightTackle.location == expectedRightTackleLocation;

                Assert.True(leftTackleInExpectedLocation);
                Assert.True(rightTackleInExpectedLocation);
            }
コード例 #3
0
            public void PlacesGuardsInCorrectLocation()
            {
                FormationPlacer formationPlacer            = new FormationPlacer(fakePlacementRuleFactory);
                Location        expectedLeftGuardLocation  = new Location(-4, 0);
                Location        expectedRightGuardLocation = new Location(4, 0);

                PlacedFormation placedFormation              = formationPlacer.ToPlacedFormation(formation);
                bool            leftGuardInExpectedLocation  = placedFormation.leftGuard.location == expectedLeftGuardLocation;
                bool            rightGuardInExpectedLocation = placedFormation.rightGuard.location == expectedRightGuardLocation;

                Assert.True(leftGuardInExpectedLocation);
                Assert.True(rightGuardInExpectedLocation);
            }