コード例 #1
0
ファイル: dataTest.cs プロジェクト: taoxiease/asegrp
 public void undefineAssociationTest()
 {
     defineAssociationTest();
     API parent = _api;
     data target = new data(parent);
     string name = Constants.TestAssociationDefName;
     target.undefineAssociation(name);
     try
     {
         target.getAssociationDefinition(name);
     }
     catch (Utility.FacebookException e)
     {
         //If it's not there, the we've we've succesfully removed the assn.
         if (e.ErrorCode != 803)
             throw e;
         //Return since we've passed
         return;
     }
     Assert.Fail("An exception should have been caught since the assn should have been removed");
 }
コード例 #2
0
ファイル: dataTest.cs プロジェクト: taoxiease/asegrp
 public void getAssociationDefinitionTest()
 {
     defineAssociationTest();
     API parent = _api;
     data target = new data(parent);
     string name = Constants.TestAssociationDefName;
     var resp = target.getAssociationDefinition(name);
     //Doesn't work right now... parsing from FB doesn't work because we don't have the new XSD.
     //You can see the values in the untyped value.
     Assert.AreEqual(resp.assoc_info1.alias, Constants.TestAssociationDefAlias1);
     Assert.AreEqual(resp.assoc_info2.alias, Constants.TestAssociationDefAlias2);
 }