public void ShouldUploadByteArrayWithCompleteDetails() { var param = UploadParameter.CreateForByteArrayUpload( ByteArrayParameterData.Create(TestByteArray, "byte array description", "byte array", "text/plain", new Dictionary <string, string> { { "bytearraykey", "bytearrayval" } }), AccountPrivateKey1) .Build(); var result = UnitUnderTest.Upload(param); Assert.IsNotNull(result); Assert.IsNotNull(result.TransactionHash); Assert.AreEqual(result.Data.ContentType, "text/plain"); Assert.IsNotNull(result.Data.DataHash); Assert.AreEqual(result.Data.Description, "byte array description"); Assert.AreEqual(result.Data.Name, "byte array"); Assert.AreEqual(result.Data.Metadata.Count, 1); Assert.IsFalse(result.Data.Metadata .Except(new Dictionary <string, string> { { "bytearraykey", "bytearrayval" } }).Any()); Assert.IsNotNull(result.Data.Timestamp); LogAndSaveResult(result, GetType().Name + ".ShouldUploadByteArrayWithCompleteDetails"); }
public void ShouldUploadByteArray() { var param = UploadParameter.CreateForByteArrayUpload( TestByteArray, AccountPrivateKey1) .Build(); var result = UnitUnderTest.Upload(param); Assert.IsNotNull(result); Assert.IsNotNull(result.TransactionHash); Assert.IsNull(result.Data.ContentType); Assert.IsNotNull(result.Data.DataHash); Assert.IsNull(result.Data.Description); Assert.IsNull(result.Data.Name); Assert.IsNull(result.Data.Metadata); Assert.IsNotNull(result.Data.Timestamp); LogAndSaveResult(result, GetType().Name + ".ShouldUploadByteArray"); }