# Path: ddsc/core/moveutil.py
# class MoveUtil(object):
#     def __init__(self, project, source_remote_path, target_remote_path):
#     def run(self):
#     def get_new_parent(self):
#     def get_new_name(self):
#     def is_folder_or_project(item):
# 
# Path: ddsc/exceptions.py
# class DDSUserException(Exception):
#     """
#     Exception with an error message to be displayed to the user on the command line.
#     """
#     pass


from unittest import TestCase
from ddsc.core.moveutil import MoveUtil, KindType
from ddsc.exceptions import DDSUserException
from mock import Mock
from __future__ import absolute_import


class MoveUtilTestCase(TestCase):
    def test_run__change_parent_and_rename(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', '/data/file2.txt')
        mock_parent = Mock()
        move_util.get_new_parent = Mock()
        move_util.get_new_parent.return_value = mock_parent
        move_util.get_new_name = Mock()
        move_util.get_new_name.return_value = 'file2.txt'

# Path: ddsc/core/moveutil.py
# class MoveUtil(object):
#     def __init__(self, project, source_remote_path, target_remote_path):
#     def run(self):
#     def get_new_parent(self):
#     def get_new_name(self):
#     def is_folder_or_project(item):
# 
# Path: ddsc/exceptions.py
# class DDSUserException(Exception):
#     """
#     Exception with an error message to be displayed to the user on the command line.
#     """
#     pass


# Path: ddsc/core/tests/test_moveutil.py
from unittest import TestCase
from ddsc.core.moveutil import MoveUtil, KindType
from ddsc.exceptions import DDSUserException
from mock import Mock

from __future__ import absolute_import


class MoveUtilTestCase(TestCase):
    def test_run__change_parent_and_rename(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', '/data/file2.txt')
        mock_parent = Mock()
        move_util.get_new_parent = Mock()
        move_util.get_new_parent.return_value = mock_parent
        move_util.get_new_name = Mock()
        move_util.get_new_name.return_value = 'file2.txt'

        result = move_util.run()