예제 #1
0
        public void TestCuilliereBoisAdd()
        {
            var tmp = Ustenciles.GetInstance().GetCuilliereBois();

            Ustenciles.GetInstance().SetCuilliereBois(5);
            Assert.AreEqual(Ustenciles.GetInstance().GetCuilliereBois(), tmp + 5, "CuilliereBois did not increase");
        }
예제 #2
0
        public void TesCouteauxMin()
        {
            var tmp = Ustenciles.GetInstance().GetCouteaux();

            Ustenciles.GetInstance().SetCouteaux(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetCouteaux(), tmp - 5, "Couteaux did not decrease");
        }
예제 #3
0
        public void TestPoelsMin()
        {
            var tmp = Ustenciles.GetInstance().GetPoels();

            Ustenciles.GetInstance().SetPoels(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetPoels(), tmp - 5, "Poels did not decrease");
        }
예제 #4
0
        public void TestCouteauxAdd()
        {
            var tmp = Ustenciles.GetInstance().GetCouteaux();

            Ustenciles.GetInstance().SetCouteaux(5);
            Assert.AreEqual(Ustenciles.GetInstance().GetCouteaux(), tmp + 5, "Couteaux did not increase");
        }
예제 #5
0
        public void TesEntoinnoirsMin()
        {
            var tmp = Ustenciles.GetInstance().GetEntoinnoirs();

            Ustenciles.GetInstance().SetEntoinnoirs(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetEntoinnoirs(), tmp - 5, "Entoinnoirs did not decrease");
        }
예제 #6
0
        public void TestEntoinnoirsAdd()
        {
            var tmp = Ustenciles.GetInstance().GetEntoinnoirs();

            Ustenciles.GetInstance().SetEntoinnoirs(5);
            Assert.AreEqual(Ustenciles.GetInstance().GetEntoinnoirs(), tmp + 5, "Entoinnoirs did not increase");
        }
예제 #7
0
        public void TestCuilliereBoisMin()
        {
            var tmp = Ustenciles.GetInstance().GetCuilliereBois();

            Ustenciles.GetInstance().SetCuilliereBois(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetCuilliereBois(), tmp - 5, "CuilliereBois did not decrease");
        }
예제 #8
0
        public void TestBolSaladesAdd()
        {
            var tmp = Ustenciles.GetInstance().GetBolSalades();

            Ustenciles.GetInstance().SetBolSalades(5);
            Assert.AreEqual(Ustenciles.GetInstance().GetBolSalades(), tmp + 5, "BolSalades did not increase");
        }
예제 #9
0
        public void TesPresseAgrumessMin()
        {
            var tmp = Ustenciles.GetInstance().GetPresseAgrumes();

            Ustenciles.GetInstance().SetPresseAgrumes(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetPresseAgrumes(), tmp - 5, "PresseAgrumes did not decrease");
        }
예제 #10
0
 /// <summary>
 /// Private constructor of the Singleton without args
 /// </summary>
 private Cuisine(Stock stock, Machines[] machines, Ustenciles ustenciles, PassePlat passePlat)
 {
     this.Stock      = stock;
     this.Machines   = machines;
     this.Ustenciles = ustenciles;
     this.PassePlat  = passePlat;
 }
예제 #11
0
 /// <summary>
 /// Private constructor of the Singleton without args
 /// </summary>
 private Cuisine()
 {
     this.Stock      = null;
     this.Machines   = null;
     this.Ustenciles = null;
     this.PassePlat  = null;
 }
예제 #12
0
        public void TestPresseAgrumesAdd()
        {
            var tmp = Ustenciles.GetInstance().GetPresseAgrumes();

            Ustenciles.GetInstance().SetPresseAgrumes(5);
            Assert.AreEqual(Ustenciles.GetInstance().GetPresseAgrumes(), tmp + 5, "PresseAgrumes did not increase");
        }
예제 #13
0
        public void TesBolSaladesMin()
        {
            var tmp = Ustenciles.GetInstance().GetBolSalades();

            Ustenciles.GetInstance().SetBolSalades(-5);
            Assert.AreEqual(Ustenciles.GetInstance().GetBolSalades(), tmp - 5, "BolSalades did not decrease");
        }
예제 #14
0
 /// <summary>
 /// Creation and return of the singleton with args
 /// </summary>
 public static Cuisine GetInstance(Stock stock, Machines[] machines, Ustenciles ustenciles, PassePlat passePlat)
 {
     if (Instance == null)
     {
         Cuisine.Instance = new Cuisine(stock, machines, ustenciles, passePlat);
     }
     return(Cuisine.Instance);
 }
예제 #15
0
 /// <summary>
 /// Creation and return of the singleton with args
 /// </summary>
 public static Ustenciles GetInstance(int casseroles, int poels, int cuillireBois, int bolSalades, int PressesAgrumes, int tamis, int entonnoirs, int couteaux)
 {
     if (Instance is null)
     {
         Instance = new Ustenciles(casseroles, poels, cuillireBois, bolSalades, PressesAgrumes, tamis, entonnoirs, couteaux);
     }
     return(Instance);
 }
예제 #16
0
 /// <summary>
 /// Creation and return of the singleton without args
 /// </summary>
 public static Ustenciles GetInstance()
 {
     if (Instance is null)
     {
         Instance = new Ustenciles();
     }
     return(Instance);
 }
예제 #17
0
 public CuisineTest()
 {
     stock        = Stock.GetInstance();
     machinesUn   = new Machines("test1", 35);
     machinesDeux = new Machines("test3", 35);
     array        = new Machines[2] {
         machinesDeux, machinesUn
     };
     ustenciles = Ustenciles.GetInstance();
     passePlat  = PassePlat.GetInstance();
 }
예제 #18
0
 public void TestSingletonUstenciles()
 {
     Assert.AreEqual(Ustenciles.GetInstance(5, 5, 5, 5, 5, 5, 5, 5), Ustenciles.GetInstance(), "Ustenciles is not a singleton");
 }