Пример #1
0
        public void ByViewAndPointAnalysisData_ValidArgs()
        {
            var samplePoints = new[]
            {
                Point.ByCoordinates(0, 2, 4),
                Point.ByCoordinates(0, 7, 4),
                Point.ByCoordinates(0, 19, 4)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = PointAnalysisData.ByPointsAndResults(
                samplePoints,
                new List <string>()
            {
                "Test points."
            },
                new IList <double>[] { sampleValues });

            var doc  = Document.Current;
            var grid = PointAnalysisDisplay.ByViewAndPointAnalysisData(doc.ActiveView, new [] { data });

            Assert.NotNull(grid);
        }
Пример #2
0
        public void ByViewAndPointAnalysisData_BadArgs()
        {
            var samplePoints = new[]
            {
                Point.ByCoordinates(0, 2, 4),
                Point.ByCoordinates(0, 7, 4),
                Point.ByCoordinates(0, 19, 4)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = PointData.ByPointsAndValues(
                samplePoints,
                sampleValues);

            var doc = Document.Current;

            Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewAndPointAnalysisData(null, data));
            Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewAndPointAnalysisData(doc.ActiveView, null));
        }
Пример #3
0
        public void ByViewAndPointAnalysisData_BadArgs()
        {
            var samplePoints = new[]
            {
                Point.ByCoordinates(0, 2, 4),
                Point.ByCoordinates(0, 7, 4),
                Point.ByCoordinates(0, 19, 4)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = PointAnalysisData.ByPointsAndResults(
                samplePoints,
                new List <string>()
            {
                "Test points."
            },
                new IList <double>[] { sampleValues });

            var doc = Document.Current;

            Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewAndPointAnalysisData(null, new [] { data }));
            Assert.Throws(typeof(System.ArgumentNullException), () => PointAnalysisDisplay.ByViewAndPointAnalysisData(doc.ActiveView, null));
            Assert.Throws(typeof(System.Exception), () => PointAnalysisDisplay.ByViewAndPointAnalysisData(doc.ActiveView, new PointAnalysisData[] { }));
        }
Пример #4
0
        public void ByViewAndPointAnalysisData_ValidArgs()
        {
            var samplePoints = new[]
            {
                Point.ByCoordinates(0, 2, 4),
                Point.ByCoordinates(0, 7, 4),
                Point.ByCoordinates(0, 19, 4)
            };

            var sampleValues = new[]
            {
                1.0,
                1092,
                -1
            };

            var data = PointData.ByPointsAndValues(
                samplePoints,
                sampleValues);

            var doc  = Document.Current;
            var grid = PointAnalysisDisplay.ByViewAndPointAnalysisData(doc.ActiveView, data);

            Assert.NotNull(grid);
        }