Beispiel #1
0
        public void GetPriceTest()
        {
            float expectedResult = 100;
            float actualResult   = prices.GetPrice((int)ComponentType.WALL);

            Assert.AreEqual(expectedResult, actualResult);
        }
        private void AddWallsPrice(BlueprintPriceReport report, IBlueprint aBlueprint)
        {
            float wallMetersCount = 0;

            foreach (Wall existent in aBlueprint.GetWalls())
            {
                wallMetersCount += existent.Length();
            }
            float wallPrice = costsNPrices.GetPrice((int)ComponentType.WALL);

            report.SetTotalPrice(ComponentType.WALL, wallMetersCount * wallPrice);
        }
 public float GetPrice(int componentType)
 {
     return(catalog.GetPrice(componentType));
 }