Ejemplo n.º 1
0
 public void Initialize()
 {
     collection = new CollectionState(new Uri(SANDBOX_URI));
     collection.AuthenticateViaOAuth2Password(Resources.TestUserName, Resources.TestPassword, Resources.TestClientId);
     Assert.DoesNotThrow(() => collection.IfSuccessful());
     Assert.IsNotNullOrEmpty(collection.CurrentAccessToken);
 }
Ejemplo n.º 2
0
 public void Initialize()
 {
     collection = new CollectionState(new Uri(SANDBOX_URI));
     collection.AuthenticateViaOAuth2Password(Resources.TestUserName, Resources.TestPassword, Resources.TestClientId);
     tree = new FamilySearchFamilyTree(true);
     tree.AuthenticateWithAccessToken(collection.CurrentAccessToken);
     cleanup = new List<GedcomxApplicationState>();
     Assert.DoesNotThrow(() => collection.IfSuccessful());
     Assert.IsNotNullOrEmpty(collection.CurrentAccessToken);
 }
Ejemplo n.º 3
0
 public void TestReadRootCollection()
 {
     Assert.DoesNotThrow(() => collection.IfSuccessful());
     Assert.AreEqual(HttpStatusCode.OK, collection.Response.StatusCode);
     Assert.IsNotNull(collection.Links);
     Assert.Greater(collection.Links.Count, 0);
     Assert.IsNotNull(collection.Entity);
     Assert.IsNotNull(collection.Entity.Collections);
     Assert.Greater(collection.Entity.Collections.Count, 0);
 }
Ejemplo n.º 4
0
        public void Initialize()
        {
            collection = new CollectionState(new Uri(SANDBOX_URI));
            collection.AuthenticateViaOAuth2Password("sdktester", "1234sdkpass", "WCQY-7J1Q-GKVV-7DNM-SQ5M-9Q5H-JX3H-CMJK");
            Assert.DoesNotThrow(() => collection.IfSuccessful());
            Assert.IsNotNullOrEmpty(collection.CurrentAccessToken);

            tree = new FamilySearchFamilyTree(true);
            tree.AuthenticateWithAccessToken(collection.CurrentAccessToken);
        }
Ejemplo n.º 5
0
 public void Initialize()
 {
     collection = new CollectionState(new Uri(SANDBOX_URI));
     collection.AuthenticateViaOAuth2Password(Resources.TestUserName, Resources.TestPassword, Resources.TestClientId);
     tree = new FamilySearchFamilyTree(true);
     tree.AuthenticateWithAccessToken(collection.CurrentAccessToken);
     cleanup = new List <GedcomxApplicationState>();
     Assert.DoesNotThrow(() => collection.IfSuccessful());
     Assert.IsNotNullOrEmpty(collection.CurrentAccessToken);
 }
Ejemplo n.º 6
0
        public void TestReadFamilyTreeCollection()
        {
            var state = new CollectionState(new Uri(collection.GetLink("family-tree").Href));

            Assert.DoesNotThrow(() => state.IfSuccessful());
            Assert.AreEqual(HttpStatusCode.OK, state.Response.StatusCode);
            Assert.IsNotNull(state.Links);
            Assert.Greater(state.Links.Count, 0);
            Assert.IsNotNull(state.Entity);
            Assert.IsNotNull(state.Entity.Collections);
            Assert.Greater(state.Entity.Collections.Count, 0);
        }
Ejemplo n.º 7
0
        public void TestReadFamilyTreeCollection()
        {
            var state = new CollectionState(new Uri(collection.GetLink("family-tree").Href));

            Assert.DoesNotThrow(() => state.IfSuccessful());
            Assert.AreEqual(HttpStatusCode.OK, state.Response.StatusCode);
            Assert.IsNotNull(state.Links);
            Assert.Greater(state.Links.Count, 0);
            Assert.IsNotNull(state.Entity);
            Assert.IsNotNull(state.Entity.Collections);
            Assert.Greater(state.Entity.Collections.Count, 0);
        }