public void IsNotFoundExceptionWithoutStatusTest()
 {
     RequestResult result = new RequestResult();
     string message = string.Empty;
     ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message);
     StorageException exception = new StorageException(result, message, innerException);
     Assert.IsFalse(exception.IsNotFoundException());
 }
        public void ResourceAlreadyExistExceptionInitTest()
        {
            string message = string.Empty;

            ResourceAlreadyExistException exception = new ResourceAlreadyExistException(message);

            message = "ResourceAlreadyExistException";
            exception = new ResourceAlreadyExistException(message);
        }
 public void RepackStorageExceptionWithoutStatusMessageTest()
 {
     RequestResult result = new RequestResult()
     {
         HttpStatusCode = 500
     };
     string message = string.Empty;
     ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message);
     StorageException exception = new StorageException(result, message, innerException);
     Assert.IsNotNull(exception.RepackStorageException());
 }
        public void IsNotFoundExceptionTest()
        {
            RequestResult result = new RequestResult()
            {
                HttpStatusCode = 500
            };
            string message = string.Empty;
            ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message);
            StorageException exception = new StorageException(result, message, innerException);
            Assert.IsFalse(exception.IsNotFoundException());

            result = new RequestResult()
            {
                HttpStatusCode = 404
            };
            exception = new StorageException(result, message, innerException);
            Assert.IsTrue(exception.IsNotFoundException());
        }
 public void RepackStorageExceptionTest()
 {
     string status = String.Empty;
     RequestResult result = new RequestResult()
     {
         HttpStatusCode = 404
     };
     string message = "storage exception";
     ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message);
     StorageException exception = new StorageException(result, message, innerException);
     exception = exception.RepackStorageException();
     Assert.IsNotNull(exception);
 }