예제 #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");
 }