public void Chain_of_Responsibility_Pattern_Test()
        {
            var first  = new FirstStep();
            var second = new SecondStep();
            var third  = new ThirdStep();

            first.Next(second).Next(third);

            Assert.IsTrue((bool)first.Handler(NumberEnum.One));
            Assert.IsTrue((bool)first.Handler(NumberEnum.Two));
            Assert.IsTrue((bool)first.Handler(NumberEnum.Three));
            Assert.IsNull(first.Handler(NumberEnum.Four));
        }
Beispiel #2
0
 public void GoToNextStep()
 {
     if (currentStep == 0)
     {
         FirstStep.SetActive(false);
         SecondStep.SetActive(true);
         currentStep++;
     }
     else if (currentStep == 1)
     {
         groupName = GroupNameText.GetComponent <TMPro.TextMeshProUGUI>().text.Trim();
         SecondStep.SetActive(false);
         ThirdStep.SetActive(true);
         currentStep++;
     }
 }