Пример #1
0
 public void AttachmentExtenderDoesNotConfuseSlashes()
 {
   var aVM = new AttachmentVM(new Attachment { Path = "/h.txt" }) { DropZone = "files" };
   aVM.Path.Should().Be("/files/h.txt");
 }
Пример #2
0
 public void BiggerAttachmentsAreShownInMegs()
 {
   var aVM = new AttachmentVM(new Attachment { Size = 2 * 1024 * 1024 + 50000 });
   aVM.Size.Should().Be("2.05");
   aVM.SizeDimension.Should().Be("MB");
 }
Пример #3
0
 public void AttachmentExtenderAddsDropZonePrefix()
 { 
   var aVM = new AttachmentVM(new Attachment { Path = "h.txt" }) { DropZone = "/files"};
   aVM.Path.Should().Be("/files/h.txt");
 }
Пример #4
0
 public void AttachmentVMShowsSizeInKilobytes()
 {
   var aVM = new AttachmentVM(new Attachment { Size = 2048 + 512 });
   aVM.Size.Should().Be("2.5");
   aVM.SizeDimension.Should().Be("KB");
 }