Beispiel #1
0
        public void Sets_Exception() {
            var exception = new Exception("Test");
            var result = new MoveResult("sourceKey", "destKey", exception);

            Assert.False(result.Success);
            Assert.Equal(exception, result.Exception);
        }
Beispiel #2
0
 public void Get_Exception_Message(Exception e, string msg) {
     var result = new MoveResult("sourceKey", "destKey", e);
     Assert.Equal(msg, result.GetErrorMessage());
 }
Beispiel #3
0
        public void Sets_ErrorMsg(string msg) {
            var exception = new Exception("Test");
            var result = new MoveResult("sourceKey", "destKey", exception, errorMsg: msg);

            Assert.Equal(msg, result.GetErrorMessage());
        }
Beispiel #4
0
 public void Sets_Success(HttpStatusCode code, bool success, string errorMsg) {
     var result = new MoveResult("sourceKey", "destKey", code);
     Assert.Equal(success, result.Success);
     Assert.Equal(errorMsg, result.GetErrorMessage());
 }
Beispiel #5
0
 public void Sets_Success(bool success) {
     var result = new MoveResult("sourceKey", "destKey", success);
     Assert.Equal(success, result.Success);
 }