Exemplo n.º 1
0
        public static CurveData <BoxWhiskerXValue, BoxWhiskerYValue> CreateBoxWhiskerCurveData(PaneData <BoxWhiskerXValue, BoxWhiskerYValue> paneData, string name, IList <BoxWhiskerXYValue> bwValues)
        {
            var curveData = new CurveData <BoxWhiskerXValue, BoxWhiskerYValue>(new Dictionary <string, string> {
                { name, name }
            })
            {
                Id      = name,
                Caption = name
            };

            foreach (var v in bwValues)
            {
                var X = new BoxWhiskerXValue(new List <string>()
                {
                    v.X1, v.X2
                });
                var Y = new BoxWhiskerYValue
                {
                    LowerWhisker = new ValueWithIndvividualId(v.LW),
                    LowerBox     = new ValueWithIndvividualId(v.LW),
                    Median       = new ValueWithIndvividualId(v.M),
                    UpperBox     = new ValueWithIndvividualId(v.LW),
                    UpperWhisker = new ValueWithIndvividualId(v.LW),
                };
                curveData.Add(X, Y);
            }

            return(curveData);
        }
Exemplo n.º 2
0
 protected override void Because()
 {
     _xValue = new BoxWhiskerXValue(new string[] { "Normal", "Young" });
     _yValue = new BoxWhiskerYValue()
     {
         LowerWhisker = 1.1F, LowerBox = 1.2F, Median = 1.3F, UpperBox = 1.4F, UpperWhisker = 1.5F
     };
     sut.Add(_xValue, _yValue);
 }
Exemplo n.º 3
0
 protected override void Because()
 {
     _xValue = new BoxWhiskerXValue(new string[] { "Normal", "Young" });
     _yValue = new BoxWhiskerYValue
     {
         LowerWhisker = new ValueWithIndvividualId(1.1F),
         LowerBox     = new ValueWithIndvividualId(1.2F),
         Median       = new ValueWithIndvividualId(1.3F),
         UpperBox     = new ValueWithIndvividualId(1.4F),
         UpperWhisker = new ValueWithIndvividualId(1.5F)
     };
     sut.Add(_xValue, _yValue);
 }
Exemplo n.º 4
0
        public static CurveData <BoxWhiskerXValue, BoxWhiskerYValue> CreateBoxWhiskerCurveData(PaneData <BoxWhiskerXValue, BoxWhiskerYValue> paneData, string name, IList <BoxWhiskerXYValue> bwValues)
        {
            var curveData = new CurveData <BoxWhiskerXValue, BoxWhiskerYValue>(new Dictionary <string, string> {
                { name, name }
            });

            curveData.Id      = name;
            curveData.Caption = name;
            foreach (var v in bwValues)
            {
                var X = new BoxWhiskerXValue(new List <string>()
                {
                    v.X1, v.X2
                });
                var Y = new BoxWhiskerYValue()
                {
                    LowerWhisker = v.LW, LowerBox = v.LW, Median = v.M, UpperBox = v.LW, UpperWhisker = v.LW
                };
                curveData.Add(X, Y);
            }

            return(curveData);
        }
Exemplo n.º 5
0
 public static void ShouldBeEqual(BoxWhiskerXValue value, string xValue1, string xValue2, float x)
 {
     value[0].ShouldBeEqualTo(xValue1);
     value[1].ShouldBeEqualTo(xValue2);
     value.X.ShouldBeEqualTo(x);
 }
Exemplo n.º 6
0
 protected override void Because()
 {
     sut = new BoxWhiskerXValue(new List <string>());
 }