Exemplo n.º 1
0
        public void CleanUpProfileScriptShouldDeleteTestUserOne()
        {
            using (var profileService = new ProfileService.ProfileServiceClient())
            {
                var profile = profileService.GetOrCreateProfile(
                    userName: testBase.TestProfileOne.UserName,
                    regionId: (int)testBase.TestProfileOne.Region,
                    platformId: (int)testBase.TestProfileOne.Region);

                testBase.TestProfileOne.ProfileGuid = profile.ProfileGuid;
            }

            using (var cleanUpService = new CleanUpService.CleanUpServiceClient())
            {
                cleanUpService.DeleteUser(testBase.TestProfileOne.ProfileGuid);
            }

            using (var profileService = new ProfileService.ProfileServiceClient())
            {
                var profile = profileService.RetrieveProfile(
                    userName: testBase.TestProfileOne.UserName,
                    regionId: (int)testBase.TestProfileOne.Region,
                    platformId: (int)testBase.TestProfileOne.Region);

                testBase.TestProfileOne.ProfileGuid = (profile == null) ? profile.ProfileGuid : Guid.Empty;
            }
        }
Exemplo n.º 2
0
 internal void CleanUp()
 {
     using (var CleanUpService = new CleanUpService.CleanUpServiceClient())
     {
         if (TestProfileOne.ProfileGuid != Guid.Empty)
         {
             CleanUpService.DeleteUser(TestProfileOne.ProfileGuid);
         }
         if (TestProfileTwo.ProfileGuid != Guid.Empty)
         {
             CleanUpService.DeleteUser(TestProfileTwo.ProfileGuid);
         }
     }
 }