コード例 #1
0
        public string GeneratedCode()
        {
            if (UserActions.Count == 0)
            {
                return(null);
            }

            var cb = new TestCodeBuilder();

            cb.NewLine("[Timeout(2000000)]");
            cb.NewLine("[UnityTest]");
            cb.NewLine("public IEnumerator Test()");
            cb.OpenBrace();

            for (int i = 0; i < UserActions.Count; i++)
            {
                var action = UserActions[i];
                if (!String.IsNullOrEmpty(action.Description))
                {
                    cb.NewLine("//" + action.Description);
                }
                cb.NewLine(action.GenerateCode());
            }

            cb.CloseBrace();

            WaitVariablesContainer.Clear();
            return(cb.ToString());
        }
コード例 #2
0
 public void CleanFlow()
 {
     UserActions.Clear();
     WaitVariablesContainer.Clear();
 }