public void init() { BaseUrl = "http://172.16.2.21:10035"; Username = "******"; Password = "******"; server = new AGServerInfo(BaseUrl, Username, Password); catalog = new AGCatalog(server, "chainyi"); TestRepositoryName = "TestCsharpclient"; repository = new AGRepository(catalog, TestRepositoryName); Testnamespace = new Namespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); TestIndexName = "gospi"; statement = new Statement("<http://example/test?abc=1&def=2>", "<http://www.w3.org/1999/02/22-rdf-syntax-ns#value>", "<http://example/test?abc=1&def=2>", "<http://example/test?client=Csharp>", "85"); }
public void TestGetNamespace() { Namespace testNamespace = new Namespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); List<Namespace> results = repoConn.GetNamespaces(); bool flag = false; foreach (Namespace ns in results) { if (ns.Prefix == testNamespace.Prefix && ns.NameSpace == testNamespace.NameSpace) { flag = true; break; } } Assert.IsTrue(flag); }
public bool Equals(Namespace ns) { if (ns.Prefix == this.Prefix && ns.NameSpace == this.NameSpace) return true; else return false; }