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; } }
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); } } }