예제 #1
0
        public string OutcomeToString(Outcome outcome)
        {
            string tag = "u";

            switch(outcome.Kind)
            {
                case Kind.Any:
                case Kind.Start:
                case Kind.End: 
                case Kind.Info:
                case Kind.Skipped:
                    tag = "u";
                    break;

                case Kind.Failed:
                case Kind.Incomplete:
                case Kind.Unknown:
                    tag = "b";
                    break;

                case Kind.Valid:
                    tag = "i";
                    break;
            }
            return string.Format("<{0}>{1} {2}</{0}>: {3}", tag, outcome.Type, outcome.Kind.ToString().ToLower(), outcome.Message);
        }
예제 #2
0
        public void WriteOutcome(Outcome outcome)
        {
            WriteLine(OutcomeToString(outcome));

            if (outcome.Vector != null)
            if (outcome.Vector.Element != null)
                if (outcome.Vector.Element.Path != null)
                {
                    string type = 
                        outcome.Vector.Element.TypeRefs.Count > 0 ?
                        " (type: "+string.Join(".", outcome.Vector.Element.TypeRefs)+")" : null;
                    
                    WriteLine("<span>{0}{1}</span>\n",
                        string.Join(".", outcome.Vector.Element.Path),
                        type);
                }
        }
예제 #3
0
        private void Add(string type, Kind kind)
        {
            Outcome outcome = new Outcome(type, kind, null, null, this.nesting);

            Outcomes.Add(outcome);
        }