示例#1
0
        public void Save_NullFileNameWithoutExtension_ReturnsTrue()
        {
            _testStore = new FileUploadStore();

            Assert.True(_testStore.Save(_httpPostedFileBase.Object, BasePath));
            _httpPostedFileBase.Verify(
                x => x.SaveAs(It.Is <string>(y => y.EndsWith(UploadFile))),
                Times.Once()
                );
        }
示例#2
0
 public void Save_NullParameter_ReturnsFalse()
 {
     Assert.False(_testStore.Save(null, BasePath));
     _httpPostedFileBase.Verify(x => x.SaveAs(It.IsAny <string>()), Times.Never());
 }