/// <remarks/> public System.IAsyncResult BeginGetAllTopics(ContentBase cb, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetAllTopics", new object[] { cb}, callback, asyncState); }
public AbsoluteTopicName[] GetAllTopics(ContentBase cb) { object[] results = this.Invoke("GetAllTopics", new object[] { cb}); return ((AbsoluteTopicName[])(results[0])); }
public void GetAllTopics() { TestNamespace testNamespace = testContent.Namespaces[1]; EditService.ContentBase contentBase = new EditService.ContentBase(); contentBase.Namespace = testNamespace.Name; EditService.AbsoluteTopicName[] topics = proxy.GetAllTopics(contentBase); // We might get some extra topics back, as FlexWiki will create things like // HomePage and _ContentBaseDefinition for us. Assert.IsTrue(testNamespace.Topics.Length <= topics.Length, "Checking that the right number of topics were returned"); // The list we get back is unordered, so we can't just walk the two arrays // and compare them. Plus, as mentioned above, there might be extras. So we're // happy as long as all the ones we expect to be there still are. foreach (TestTopic topic in testNamespace.Topics) { Assert.IsTrue(HasTopic(topics, topic.Name), string.Format("Checking that topic {0} was returned", topic.Name)); } }