public void Check_That_FileFieldUploadPath_isCorrect_Fill([ContentAccessValues] ContentAccess access, [MappingValues] Mapping mapping) { using (var context = GetDataContext(access, mapping)) { var items = context.FileFieldsItems.FirstOrDefault(); var expectedUploadPath = UPLOAD_PATH + ValuesHelper.GetFileContentId(mapping); Assert.That(items.FileItemUploadPath, Is.EqualTo(expectedUploadPath)); } }
private string ExpectedUploadUrl(string pref, string fileName, Mapping mapping) { if (string.IsNullOrEmpty(pref)) { return(String.Format("{0}{1}/{2}", UploadUrlRel, ValuesHelper.GetFileContentId(mapping), fileName)); } else { return(String.Format("{0}{1}/{2}", UploadUrlAbs, ValuesHelper.GetFileContentId(mapping), fileName)); } }