public void CacheItemWithGivenTypeAndValue() { XmlDocument document = new XmlDocument(); document.LoadXml(@"<pivotCacheRecords><r><n v=""20100076""/><x v=""0""/><b v=""0""/></r></pivotCacheRecords>"); var topNode = document.SelectSingleNode("//r"); var namespaceManager = TestUtility.CreateDefaultNSM(); var item = new CacheItem(namespaceManager, topNode, PivotCacheRecordType.n, "493"); Assert.AreEqual(3, topNode.ChildNodes.Count); item.AddSelf(topNode); Assert.AreEqual(PivotCacheRecordType.n, item.Type); Assert.AreEqual("493", item.Value); Assert.AreEqual(4, topNode.ChildNodes.Count); }