public void Dispose()
        {
            try
            {
                // This serves as delete cluster test
                var deleteClusterUtils = new DeleteClusterSamples();
                Assert.Contains(
                    $"Game server cluster deleted: {ClusterName}",
                    deleteClusterUtils.DeleteGameServerCluster(ProjectId, RegionId, RealmId, ClusterId));
            }
            catch (Exception e)
            {
                Console.WriteLine($"Failed to delete Game Server {ClusterName}");
                Console.WriteLine(e);
            }

            try
            {
                // Delete realm used for tests
                var deletedRealmUtils = new DeleteRealmSamples();
                deletedRealmUtils.DeleteRealm(ProjectId, RegionId, RealmId);
            }
            catch (Exception e)
            {
                Console.WriteLine($"Failed to delete Realm {RealmId}");
                Console.WriteLine(e);
            }
        }
Esempio n. 2
0
 public void Dispose()
 {
     try
     {
         var deletedRealmUtils = new DeleteRealmSamples();
         Assert.Contains(
             $"Realm {RealmName} deleted.",
             deletedRealmUtils.DeleteRealm(ProjectId, RegionId, RealmId));
     }
     catch (Exception)
     {
         Console.WriteLine($"Failed to delete Realm {RealmId}");
     }
 }