Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
 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));
     }
 }