예제 #1
0
 public void ShouldBeCorrectValues()
 {
     var actual = new Profit(FOOD_VALUE, PRODUCTION_VALUE, GOLD_VALUE);
     Assert.AreEqual (actual.Food, FOOD_VALUE);
     Assert.AreEqual (actual.Production, PRODUCTION_VALUE);
     Assert.AreEqual (actual.Gold, GOLD_VALUE);
 }
예제 #2
0
        public void ShouldCorrectAdd()
        {
            var expectedFoodValue = FOOD_VALUE + FOOD_VALUE;
            var expectedProductionValue = PRODUCTION_VALUE + PRODUCTION_VALUE;
            var expectedGoldValue = GOLD_VALUE + GOLD_VALUE;

            var profit1 = new Profit(FOOD_VALUE, PRODUCTION_VALUE, GOLD_VALUE);
            var profit2 = profit1;

            var actual = profit1 + profit2;

            Assert.AreEqual (actual.Food, expectedFoodValue);
            Assert.AreEqual (actual.Production, expectedProductionValue);
            Assert.AreEqual (actual.Gold, expectedGoldValue);
        }
예제 #3
0
 public Terrain(string terrainName, Profit terrainProfit)
 {
     this.TerrainName = terrainName;
     this.TerrainProfit = terrainProfit;
 }
예제 #4
0
 public Terrain()
 {
     this.TerrainName = string.Empty;
     this.TerrainProfit = Profit.Default;
 }