public void SetCost(int componentType, float newCost)
 {
     if (!currentSession.UserLogged.HasPermission(Permission.MANAGE_COSTS))
     {
         throw new NoPermissionsException();
     }
     catalog.SetCost(componentType, newCost);
 }
Exemple #2
0
        public void SetCostTest()
        {
            float expectedResult = 25;

            prices.SetCost((int)ComponentType.WALL, 25);
            float actualResult = prices.GetCost((int)ComponentType.WALL);

            Assert.AreEqual(expectedResult, actualResult);
        }