public static void AddNewHypothesis(string ButtonCollor, string ButtonText)
        {
            int id = Variations.Count + 1;

            //Add the new combined variant
            if (ButtonCollor != null && ButtonText != null)
            {
                AddToCartButtonVariation tmp = new AddToCartButtonVariation();
                tmp.id                  = id;
                tmp.Type                = TestTypesEnum.ADDTOCARTBUTTON;
                tmp.colorPalette        = ButtonCollor;
                tmp.addToCartTextCopies = ButtonText;

                Variations.Add(tmp);
                id++;
            }

            //Combine new colour with existing copies
            if (ButtonCollor != null)
            {
                for (int i = 0; i < AddToCartTextCopies.Length; i++)
                {
                    AddToCartButtonVariation tmp = new AddToCartButtonVariation();
                    tmp.id                  = id;
                    tmp.Type                = TestTypesEnum.ADDTOCARTBUTTON;
                    tmp.colorPalette        = ButtonCollor;
                    tmp.addToCartTextCopies = AddToCartTextCopies[i];

                    Variations.Add(tmp);
                    id++;
                }

                Array.Resize(ref ColorPalette, ColorPalette.Length + 1);
                ColorPalette[ColorPalette.Length - 1] = ButtonCollor;
            }

            //Combine new copy with existing colours
            if (ButtonText != null)
            {
                for (int i = 0; i < ColorPalette.Length; i++)
                {
                    AddToCartButtonVariation tmp = new AddToCartButtonVariation();
                    tmp.id                  = id;
                    tmp.Type                = TestTypesEnum.ADDTOCARTBUTTON;
                    tmp.colorPalette        = ColorPalette[i];
                    tmp.addToCartTextCopies = ButtonText;

                    Variations.Add(tmp);
                    id++;
                }

                Array.Resize(ref AddToCartTextCopies, AddToCartTextCopies.Length + 1);
                AddToCartTextCopies[AddToCartTextCopies.Length - 1] = ButtonText;
            }
        }
        //Creates the permutations with IDs.
        //Id-s starting from 1. Zero is reserved for the no-change variation (absolute control / vanilla)
        public static void Initialise()
        {
            Configuration.MainController.GetCLI();
            int id = 1;


            //Initialise test variants
            for (int i = 0; i < ColorPalette.Length; i++)
            {
                for (int j = -1; j < AddToCartTextCopies.Length; j++)
                {
                    AddToCartButtonVariation tmp = new AddToCartButtonVariation();
                    tmp.id   = id;
                    tmp.Type = TestTypesEnum.ADDTOCARTBUTTON;

                    if (i != -1)
                    {
                        tmp.colorPalette = ColorPalette[i];
                    }
                    else
                    {
                        tmp.colorPalette = null;
                    }

                    if (j != -1)
                    {
                        tmp.addToCartTextCopies = AddToCartTextCopies[j];
                    }
                    else
                    {
                        tmp.addToCartTextCopies = null;
                    }

                    Variations.Add(tmp);
                    id++;
                }
            }

            //Initialise absolute control
            AbsoluteControl      = new AddToCartButtonVariation();
            AbsoluteControl.id   = 0;
            AbsoluteControl.Type = TestTypesEnum.ADDTOCARTBUTTON;

            //Set the current winner control to be the absolute control
            CurrentWinnerControl = AbsoluteControl;

            isInitialised = true;
        }
 /// <summary>
 /// Called when a addToCartButtonTest completes, and a new winner found.
 /// </summary>
 /// <param name="id"></param>
 public static void SetNewWinnerControl(int id)
 {
     if (id == 0)
     {
         CurrentWinnerControl = AbsoluteControl;
     }
     else
     {
         for (int i = 0; i < Variations.Count; i++)
         {
             if (Variations[i].id == id)
             {
                 CurrentWinnerControl = Variations[i];
                 return;
             }
         }
     }
 }