Ejemplo n.º 1
0
        public async Task UndeleteWhenFileExists()
        {
            MockFile.Setup(x => x.Exists(Filename + ".deleted")).ReturnsAsync(true);
            await FileStreamer.Undelete(Filename);

            MockFile.Verify(x => x.Move(Filename + ".deleted", Filename), Times.Once);
        }
Ejemplo n.º 2
0
        public async Task UndeleteWhenFileDoesNotExists()
        {
            await FileStreamer.Undelete(Filename);

            MockFile.Verify(x => x.Move(Filename + ".deleted", Filename), Times.Never);
        }