Example #1
0
 /// <summary>
 /// Creation and return of the singleton with args
 /// </summary>
 public static ChefSucre GetInstance(String nom, String prenom)
 {
     if (Instance == null)
     {
         ChefSucre.Instance = new ChefSucre(nom, prenom);
     }
     return(ChefSucre.Instance);
 }
Example #2
0
 /// <summary>
 /// Creation and return of the singleton without args
 /// </summary>
 public static ChefSucre GetInstance()
 {
     if (Instance == null)
     {
         ChefSucre.Instance = new ChefSucre();
     }
     return(ChefSucre.Instance);
 }
Example #3
0
 public void TestSingletonChefSucre()
 {
     Assert.AreEqual(ChefSucre.GetInstance("test", "test"), ChefSucre.GetInstance(), "ChefSucre is not a singleton");
 }