コード例 #1
0
        public void HandlesUnitTypeWithProtossUnit(ProtossUnitType unit)
        {
            var unitType      = new UnitType(unit);
            var otherUnitType = new UnitType(unit);

            Assert.IsTrue(unitType == otherUnitType);
        }
コード例 #2
0
        public void HandlesBuildingOrUnitTypeWithProtossUnit(ProtossUnitType unit)
        {
            var buildingOrUnitType      = new BuildingOrUnitType(unit);
            var otherBuildingOrUnitType = new BuildingOrUnitType(unit);

            Assert.IsTrue(buildingOrUnitType == otherBuildingOrUnitType);
        }
コード例 #3
0
        public BuildingOrUnitType(ProtossUnitType unit)
        {
            if (unit == ProtossUnitType.Unspecified)
            {
                throw new ArgumentException("Invalid ProtossUnitType - 'Unspecified'.", "building");
            }

            this.ProtossUnit = unit;
        }
コード例 #4
0
 public BuildingOrUnitType(ProtossUnitType unit)
 {
     this.Value = unit;
 }
コード例 #5
0
        public void HandlesProtossUnitType(ProtossUnitType unit)
        {
            var unitType = new UnitType(unit);

            Assert.IsTrue(unitType == unit);
        }
コード例 #6
0
 public UnitType(ProtossUnitType unit)
 {
     this.Value = unit;
 }
コード例 #7
0
        public void HandlesProtossUnitType(ProtossUnitType unit)
        {
            var buildingOrUnitType = new BuildingOrUnitType(unit);

            Assert.IsTrue(buildingOrUnitType == unit);
        }