public void TestGetDiscUsage() { string storage = null; Com.Aspose.Storage.Model.DiscUsageResponse actual; actual = target.GetDiscUsage(storage); Assert.AreEqual("200", actual.Code); }
public void StorageGetDiscUsageTest() { GetDiscUsageRequest request = new GetDiscUsageRequest(); request.storage = storageName; var response = StorageApi.GetDiscUsage(request); Assert.AreEqual(200, response.Code); }
public void TestGetDiscUsage() { // Arrange var request = new GetDiscUsageRequest(); // Act & Assert var response = StorageApi.GetDiscUsage(request); Assert.NotNull(response); Assert.Greater(response.TotalSize, 0); Assert.Greater(response.UsedSize, 0); }
public static void Run() { var apiInstance = new StorageApi(Constants.GetConfig()); try { var request = new GetDiscUsageRequest(Constants.MyStorage); var response = apiInstance.GetDiscUsage(request); Console.WriteLine("Expected response type is DiscUsage: " + response.UsedSize); } catch (Exception e) { Console.WriteLine("Exception while calling StorageApi: " + e.Message); } }
public static void Run() { var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey); var apiInstance = new StorageApi(configuration); try { var request = new GetDiscUsageRequest(Common.MyStorage); var response = apiInstance.GetDiscUsage(request); Console.WriteLine("Expected response type is DiscUsage: " + response.UsedSize.ToString()); } catch (Exception e) { Console.WriteLine("Exception while calling StorageApi: " + e.Message); } }
public void StorageGetDiscUsageTest() { var request = new GetDiscUsageRequest(); request.Storage = StorageName; DiscUsageResponse response = null; try { response = StorageApi.GetDiscUsage(request); } catch (Exception ex) { Assert.IsTrue(ex.Message.Contains("not implemented"), ex.Message); return; } Assert.AreEqual(200, response.Code); }
public static void Run() { // ExStart:1 StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); string storage = "MyStorageName"; try { // Invoke Aspose.Storage Cloud SDK API to get disc usage DiscUsageResponse apiResponse = storageApi.GetDiscUsage(storage); if (apiResponse != null && apiResponse.Status.Equals("OK")) { Console.WriteLine("Total Size (bytes): " + apiResponse.DiscUsage.TotalSize); Console.WriteLine("Used Size (bytes): " + apiResponse.DiscUsage.UsedSize); Console.ReadKey(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); } // ExEnd:1 }