Esempio n. 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!this.isDisposed)
            {
                if (disposing)
                {
                    StaticLogger.Instance.Info($"IT run {this.testData.Nonce} finished. Cleaning up...");

                    this.RemoveObjectsFromTenantAsync()
                    .GetAwaiter().GetResult();

                    StaticLogger.Instance.Info($"Done cleaning up objects.");

                    StaticLogger.Instance.Info("Caching statistics:");
                    StaticLogger.Instance.Info(TestClients.GetSAuthc1Client().GetCacheProvider().ToString());

                    var filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "its.log");
                    StaticLogger.Instance.Info($"Saving log to file {filename}");
                    System.IO.File.WriteAllText(filename, StaticLogger.GetLog());
                }

                this.isDisposed = true;
            }
        }