DeleteActivityProfile() 공개 메소드

Deletes the profile for a given activity
public DeleteActivityProfile ( string activityId, string profileId ) : void
activityId string The activity ID
profileId string The profile document key
리턴 void
        public void ActivityProfileTest()
        {
            TCAPI target = new TCAPI("https://cloud.scorm.com/ScormEngineInterface/TCAPI/CZSWMUZPSE", new BasicHTTPAuth("CZSWMUZPSE", "vwiuflgsY22FDXpHA4lwwe5hrnUXvcyJjW3fDrpH"));
            Actor actor = new Actor("Mufasa", "mailto:[email protected]");
            string[] profileIds = { "The Lion King", "The Fallen King", "The New King" };
            string[] profileContents = {
                "Mufasa rules his country as a proud and fair king of lions, celebrating his recently newborn son Simba.",
                "Scar kills Mufasa, simply muttering the words 'Long Live the King'",
                "Simba finally realizes he must follow in his fathers footsteps to save the kingdom from the evil Scar." };
            string activityId = "example.com/TheLionKing";
            string[] actual;
            actual = target.GetActivityProfileIds(activityId);

            //Assert.AreEqual(0, actual.Length);

            ActivityProfile profile = new ActivityProfile();
            profile.ActivityId = activityId;
            profile.ProfileId = profileIds[0];
            profile.Body = profileContents[0];
            ActivityProfile pp = new ActivityProfile();
            pp.ActivityId = activityId;
            pp.ProfileId = profileIds[0];
            pp.Body = profileContents[0];

            target.SaveActivityProfile(profile, true, pp);

            profile.ProfileId = profileIds[1];
            profile.Body = profileContents[1];

            target.SaveActivityProfile(profile);

            profile.ProfileId = profileIds[2];
            profile.Body = profileContents[2];

            target.SaveActivityProfile(profile);

            /*
            ActivityProfile previous = new ActivityProfile();
            previous.ProfileId = profileIds[2];
            previous.Body = profileContents[1];

            target.SaveActivityProfile(profile, false, previous);
            */

            actual = target.GetActivityProfileIds(activityId);
            Assert.AreEqual(3, actual.Length);

            ActivityProfile apResult = target.GetActivityProfile(activityId, profileIds[0]);
            Assert.AreEqual(profileContents[0], apResult.Body);

            apResult = target.GetActivityProfile(activityId, profileIds[1]);
            Assert.AreEqual(profileContents[1], apResult.Body);

            apResult = target.GetActivityProfile(activityId, profileIds[2]);
            Assert.AreEqual(profileContents[2], apResult.Body);

            target.DeleteActivityProfile(activityId, profileIds[0]);
            actual = target.GetActivityProfileIds(activityId);
            Assert.AreEqual(2, actual.Length);

            target.DeleteAllActivityProfile(activityId);
            actual = target.GetActivityProfileIds(activityId);
            Assert.AreEqual(0, actual.Length);
        }
 /// <summary>
 ///A test for DeleteActivityProfile
 ///</summary>
 //[TestMethod()]
 public void DeleteActivityProfileTest()
 {
     TCAPI target = new TCAPI("http://cloud.scorm.com/ScormEngineInterface/TCAPI/public", new BasicHTTPAuth("test", "password"));
     string activityId = "example.com";
     string profileId = "Bananas";
     target.DeleteActivityProfile(activityId, profileId);
     Assert.Inconclusive(INCONCLUSIVE);
 }