public void ShouldUploadPathWithCompleteDetails() { var param = UploadParameter.CreateForPathUpload( PathParameterData.Create(TestPathFile, "path description", "path name", new Dictionary <string, string> { { "pathkey", "pathval" } }), AccountPrivateKey1) .Build(); var result = UnitUnderTest.Upload(param); Assert.IsNotNull(result.TransactionHash); Assert.AreEqual(result.Data.ContentType, PathUploadContentType); Assert.IsNotNull(result.Data.DataHash); Assert.AreEqual(result.Data.Description, "path description"); Assert.AreEqual(result.Data.Name, "path name"); Assert.AreEqual(result.Data.Metadata.Count, 1); Assert.IsFalse(result.Data.Metadata.Except(new Dictionary <string, string> { { "pathkey", "pathval" } }).Any()); Assert.IsNotNull(result.Data.Timestamp); LogAndSaveResult(result, GetType().Name + ".ShouldUploadPathWithCompleteDetails"); }
private IObservable <ProximaxDataModel> UploadPath(PathParameterData pathParamData) { return(FileUploadService.UploadPath(pathParamData.Path).Select(ipfsUploadResponse => ProximaxDataModel.Create(pathParamData, ipfsUploadResponse.DataHash, null, pathParamData.ContentType, ipfsUploadResponse.Timestamp))); }