public void SetCost(int componentType, float newCost)
 {
     if (!currentSession.UserLogged.HasPermission(Permission.MANAGE_COSTS))
     {
         throw new NoPermissionsException();
     }
     catalog.SetCost(componentType, newCost);
 }
Example #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);
        }