Beispiel #1
0
        public void ByEyePointTargetAndElement_BadArgs()
        {
            var eye    = Point.ByCoordinates(100, 100, 100);
            var target = Point.ByCoordinates(0, 1, 2);
            var name   = "treeView";

            var famSym  = FamilySymbol.ByName("Kousa Dogwood - 10'");
            var pt      = Point.ByCoordinates(0, 1, 2);
            var famInst = FamilyInstance.ByPoint(famSym, pt);

            Assert.Throws(typeof(ArgumentNullException), () => PerspectiveView.ByEyePointTargetAndElement(null, target, famInst, name, false));
            Assert.Throws(typeof(ArgumentNullException), () => PerspectiveView.ByEyePointTargetAndElement(eye, null, famInst, name, false));
            Assert.Throws(typeof(ArgumentNullException), () => PerspectiveView.ByEyePointTargetAndElement(eye, target, null, name, false));
            Assert.Throws(typeof(ArgumentNullException), () => PerspectiveView.ByEyePointTargetAndElement(eye, target, famInst, null, false));
        }
Beispiel #2
0
        public void ByEyePointTargetAndElement_ValidArgs()
        {
            var eye    = Point.ByCoordinates(100, 100, 100);
            var target = Point.ByCoordinates(0, 1, 2);
            var name   = "treeView";

            var famSym  = FamilySymbol.ByName("Kousa Dogwood - 10'");
            var pt      = Point.ByCoordinates(0, 1, 2);
            var famInst = FamilyInstance.ByPoint(famSym, pt);

            var view = PerspectiveView.ByEyePointTargetAndElement(eye, target, famInst, name, false);

            Assert.NotNull(view);
            Assert.IsTrue(DocumentManager.Instance.ElementExistsInDocument(
                              new ElementUUID(view.InternalElement.UniqueId)));
        }