Exemplo n.º 1
0
        public void OAuthClientCollectionIsIterable(string xmlData)
        {
            var col = OAuthClientCollection.FromXMLData(xmlData);

            foreach (var c in col)
            {
                System.Console.WriteLine(c.Organisatienaam);
            }
        }
Exemplo n.º 2
0
        public void OAuthClientCollectionNotContains(string xml, string name)
        {
            var OAuthClient = OAuthClientCollection.FromXMLData(xml);

            Assert.Throws <KeyNotFoundException>(() => OAuthClient.GetByOrganisatienaam(name));
        }
Exemplo n.º 3
0
        public void OAuthClientCollectionContains(string name)
        {
            var OAuthClient = OAuthClientCollection.FromXMLData(TestData.OAuthClientCollectionExampleXML);

            Assert.NotNull(OAuthClient.GetByOrganisatienaam(name));
        }
Exemplo n.º 4
0
 public void OAuthClientCollectionXSDFail(string xmlData)
 {
     Assert.ThrowsAny <System.Xml.Schema.XmlSchemaException>(
         () => OAuthClientCollection.FromXMLData(xmlData));
 }
Exemplo n.º 5
0
 public void OAuthClientCollectionInvalidXML(string xmlData)
 {
     Assert.ThrowsAny <XmlException>(() => OAuthClientCollection.FromXMLData(xmlData));
 }
Exemplo n.º 6
0
 public void OAuthClientCollectionParseOK(string xmlData)
 {
     OAuthClientCollection.FromXMLData(xmlData);
 }
        public async Task <OAuthClientCollection> OAuthClientCollectionDownload(string uri)
        {
            var httpClientFactory = new StringHttpClienFactoryMock(TestData.OAuthClientCollectionExampleXML);

            return(await OAuthClientCollection.FromURLAsync(new Uri(uri), httpClientFactory));
        }