public void ByNameNumberTitleBlockAndViews_BadArgs() { ElementBinder.IsEnabled = false; var famSymName = "E1 30x42 Horizontal"; var famName = "E1 30 x 42 Horizontal"; var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName); var famTyp = FamilyType.ByName("Kousa Dogwood - 10'"); var pt = Point.ByCoordinates(0, 1, 2); var famInst = FamilyInstance.ByPoint(famTyp, pt); var pt2 = Point.ByCoordinates(100, 100, 0); var famInst2 = FamilyInstance.ByPoint(famTyp, pt2); var view = SectionView.ByBoundingBox(famInst.BoundingBox); var view2 = SectionView.ByBoundingBox(famInst2.BoundingBox); var sheetName = "Poodle"; var sheetNumber = "A1"; Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndViews(null, sheetNumber, titleBlock, new[] { view, view2 })); Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndViews(sheetName, null, titleBlock, new[] { view, view2 })); Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndViews(sheetName, sheetNumber, null, new[] { view, view2 })); Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndViews(sheetName, sheetNumber, titleBlock, null)); }
public void ByNameNumberTitleBlockViewsAndLocations_ValidArgs() { ElementBinder.IsEnabled = false; var famSymName = "E1 30x42 Horizontal"; var famName = "E1 30 x 42 Horizontal"; var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName); var famTyp = FamilyType.ByName("Kousa Dogwood - 10'"); var pt = Point.ByCoordinates(0, 1, 2); var famInst = FamilyInstance.ByPoint(famTyp, pt); var pt2 = Point.ByCoordinates(100, 100, 0); var famInst2 = FamilyInstance.ByPoint(famTyp, pt2); var view = SectionView.ByBoundingBox(famInst.BoundingBox); var view2 = SectionView.ByBoundingBox(famInst2.BoundingBox); var location = Point.ByCoordinates(0, 0, 0); var location2 = Point.ByCoordinates(0, 1, 0); var sheetName = "Poodle"; var sheetNumber = "A1"; var ele = Sheet.ByNameNumberTitleBlockViewsAndLocations(sheetName, sheetNumber, titleBlock, new[] { view, view2 }, new[] { location, location2 }); Assert.NotNull(ele); }
public void ByFamilyAndName_BadArgs() { var fam = Family.ByName("Box"); Assert.Throws(typeof(Exception), () => FamilyType.ByFamilyAndName(fam, "Turtle")); Assert.Throws(typeof(System.ArgumentNullException), () => FamilyType.ByFamilyAndName(fam, null)); Assert.Throws(typeof(System.ArgumentNullException), () => FamilyType.ByFamilyAndName(null, "Turtle")); }
public void ByFamilyAndName_GoodArgs() { var fam = Family.ByName("Box"); var famTyp = FamilyType.ByFamilyAndName(fam, "Box"); Assert.NotNull(famTyp); Assert.AreEqual("Box", famTyp.Name); Assert.AreEqual("Box", famTyp.Family.Name); }
public void ByNameNumberTitleBlock_BadArgs() { // Arrange ElementBinder.IsEnabled = false; var famSymName = "E1 30x42 Horizontal"; var famName = "E1 30 x 42 Horizontal"; var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName); var sheetName = "Poodle"; var sheetNumber = "A1"; // Assert Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlock(null, sheetNumber, titleBlock)); Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlock(sheetName, null, titleBlock)); Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlock(sheetName, sheetNumber, null)); }
public void ByNameNumberTitleBlock_ValidArgs() { // Arrange ElementBinder.IsEnabled = false; var famSymName = "E1 30x42 Horizontal"; var famName = "E1 30 x 42 Horizontal"; var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName); var sheetName = "Poodle"; var sheetNumber = "A1"; // Act var ele = Sheet.ByNameNumberTitleBlock(sheetName, sheetNumber, titleBlock); // Assert Assert.NotNull(ele); Assert.AreEqual(sheetName, ele.SheetName); Assert.AreEqual(sheetNumber, ele.SheetNumber); }