public void AwsS3DirectoryProperties() { if (!Global.TestAws) { throw new Exception("Amazon S3 Tests Are Not Enabled. Set Global.TestAws To True To Enable."); } String dirName = Global.RandomDirectory; String path = $"{Global.AwsS3WorkingPath}{dirName}/"; Console.WriteLine(path); ZephyrDirectory dir = new AwsS3ZephyrDirectory(Global.Clients.aws, path); dir.Create(); Console.WriteLine($"FullName : {dir.FullName}"); Assert.AreEqual(dir.FullName, path); Console.WriteLine($"Name : {dir.Name}"); Assert.AreEqual(dir.Name, dirName); Console.WriteLine($"Parent : {dir.Parent}"); Assert.AreEqual(dir.Parent, Global.AwsS3WorkingPath); Console.WriteLine($"Root : {dir.Root}"); Assert.AreEqual(dir.Root, Global.AwsS3WorkingDirectory.Root); Console.WriteLine($"Exists : {dir.Exists}"); Assert.That(dir.Exists); dir.Delete(); }
public void AwsS3DirectoryCreate() { if (!Global.TestAws) { throw new Exception("Amazon S3 Tests Are Not Enabled. Set Global.TestAws To True To Enable."); } String path = $"{Global.AwsS3WorkingPath}{Global.RandomDirectory}/"; Console.WriteLine(path); ZephyrDirectory dir = new AwsS3ZephyrDirectory(Global.Clients.aws, path); dir.Create(); Assert.IsTrue(Utilities.Exists(path, Global.Clients)); dir.Delete(); }