public void SetData(BaseUnitTesting unitTesting, UnitTestingData unitTestingData)
        {
            m_unitTesting     = unitTesting;
            m_unitTestingData = unitTestingData;

            gameObject.transform.Find("TitleText").GetComponent <Text>().text = m_unitTestingData.MethodName.ToScriptName();

            GetComponentInChildren <InputField>().onValueChanged.RemoveAllListeners();
            GetComponentInChildren <InputField>().onValueChanged.AddListener(OnValueChanged);
        }
Ejemplo n.º 2
0
        public void SetData(BaseUnitTesting unitTesting, UnitTestingData unitTestingData)
        {
            m_unitTesting     = unitTesting;
            m_unitTestingData = unitTestingData;

            gameObject.transform.Find("TitleText").GetComponent <Text>().text = m_unitTestingData.MethodName.ToScriptName();

            Button button = GetComponent <Button>();

            button.onClick.RemoveAllListeners();
            button.onClick.AddListener(OnButtonClicked);
        }
        public void SetData(BaseUnitTesting unitTesting, UnitTestingData unitTestingData)
        {
            m_unitTesting = unitTesting;
            m_unitTestingData = unitTestingData;

            gameObject.transform.Find("TitleText").GetComponent<Text>().text = m_unitTestingData.MethodName.ToScriptName();

            TestToggle attribute = m_unitTestingData.Attribute as TestToggle;

            Toggle toggle = GetComponent<Toggle>();
            toggle.onValueChanged.RemoveAllListeners();
            toggle.onValueChanged.AddListener(OnToggleChanged);
            toggle.isOn = attribute.IsOn;
        }
        public void SetData(BaseUnitTesting unitTesting, UnitTestingData unitTestingData)
        {
            m_unitTesting     = unitTesting;
            m_unitTestingData = unitTestingData;

            gameObject.transform.Find("TitleText").GetComponent <Text>().text = m_unitTestingData.MethodName.ToScriptName();

            TestDropdown attribute = m_unitTestingData.Attribute as TestDropdown;

            m_optionData = attribute.OptionData;

            Dropdown dropdown = GetComponentInChildren <Dropdown>();

            dropdown.onValueChanged.RemoveAllListeners();
            dropdown.onValueChanged.AddListener(OnValueChange);
            dropdown.ClearOptions();
            dropdown.AddOptions(m_optionData);
        }
        public void SetData(BaseUnitTesting unitTesting, UnitTestingData unitTestingData)
        {
            m_unitTesting     = unitTesting;
            m_unitTestingData = unitTestingData;

            gameObject.transform.Find("TitleText").GetComponent <Text>().text = m_unitTestingData.MethodName.ToScriptName();
            m_valueText = gameObject.transform.Find("ValueText").GetComponent <Text>();

            TestSlider attribute = m_unitTestingData.Attribute as TestSlider;

            Slider slider = GetComponentInChildren <Slider>();

            slider.onValueChanged.RemoveAllListeners();
            slider.onValueChanged.AddListener(OnValueChanged);
            slider.minValue  = attribute.MinValue;
            slider.maxValue  = attribute.MaxValue;
            slider.value     = attribute.InitValue;
            m_valueText.text = attribute.InitValue.ToString();
        }