public virtual void testPartIDConsistency() { JDFDoc doc = new JDFDoc("Part"); JDFPart p = (JDFPart)doc.getRoot(); VString knownAtts = p.knownAttributes(); IEnumerator it = EnumPartIDKey.iterator(); while (it.MoveNext()) { string name = ((EnumPartIDKey)it.Current).getName(); Assert.IsTrue(knownAtts.Contains(name), "name missing in Part: " + name); } }
public virtual void testSetPartMap() { JDFDoc doc = new JDFDoc("Part"); JDFPart part = (JDFPart)doc.getRoot(); JDFAttributeMap map = new JDFAttributeMap("Side", "Front"); part.setPartMap(map); Assert.AreEqual(map, part.getPartMap()); map.put("Side", "Back"); map.put("Run", "1"); part.setPartMap(map); Assert.AreEqual(map, part.getPartMap()); part.setPartMap(null); Assert.AreEqual(new JDFAttributeMap(), part.getPartMap()); }