public void CreateDeleteApplicationTest() { using (UndoContext context = UndoContext.Current) { context.Start(); //Arrange var client = new GraphTestBase(); //Test var passwordCredential = client.CreatePasswordCredential(); var keyCredential = client.CreateKeyCredential(); var application = client.CreateApplication(passwordCredential, keyCredential); try { var newPasswordCredential = client.CreatePasswordCredential(); client.UpdateApplication(application.ObjectId, newPasswordCredential); } finally { client.DeleteApplication(application.ObjectId); } //verify the app has been deleted. Assert.Throws(typeof(CloudException), () => { client.GetpplicationByAppObjectId(application.ObjectId); }); } }