# Path: eulcommon/binfile/outlookexpress.py
# class MacIndex(binfile.BinaryStructure):
# class MacIndexMessage(binfile.BinaryStructure):
# class MacMail(binfile.BinaryStructure):
# class MacMailMessage(binfile.BinaryStructure):
# class MacFolder(object):
#     MAGIC_NUMBER = 'FMIn'  # data file is FMDF
#     LENGTH = 52
#     MAGIC_NUMBER = 'FMDF'  # data file (?)
#     MESSAGE = 'MSum'
#     DELETED_MESSAGE = 'MDel'
#     def sanity_check(self):
#     def messages(self):
#     def sanity_check(self):
#     def get_message(self, offset, size):
#     def __init__(self, size, *args, **kwargs):
#     def deleted(self):
#     def data(self):
#     def as_email(self):
#     def __init__(self, folder_path):
#     def count(self):
#     def raw_messages(self):
#     def messages(self):
#     def all_messages(self):
#     def _messages(self, skip_deleted=True):


from email import message
from eulcommon.binfile import outlookexpress
import unittest
import os
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.




TEST_ROOT = os.path.dirname(__file__)
# Outlook Express 4.5 Mac folder directory inside fixtures directory
FIXTURE_FOLDER = os.path.join(TEST_ROOT, 'fixtures', 'oemacfolder')

class TestMacIndex(unittest.TestCase):
    index_filename = os.path.join(FIXTURE_FOLDER, 'Index')
    data_filename = os.path.join(FIXTURE_FOLDER, 'Mail')

    def test_basic_properties(self):
        idx = outlookexpress.MacIndex(self.index_filename)

        self.assertEqual(2, idx.total_messages)
        self.assertTrue(idx.sanity_check())


# Path: eulcommon/binfile/outlookexpress.py
# class MacIndex(binfile.BinaryStructure):
# class MacIndexMessage(binfile.BinaryStructure):
# class MacMail(binfile.BinaryStructure):
# class MacMailMessage(binfile.BinaryStructure):
# class MacFolder(object):
#     MAGIC_NUMBER = 'FMIn'  # data file is FMDF
#     LENGTH = 52
#     MAGIC_NUMBER = 'FMDF'  # data file (?)
#     MESSAGE = 'MSum'
#     DELETED_MESSAGE = 'MDel'
#     def sanity_check(self):
#     def messages(self):
#     def sanity_check(self):
#     def get_message(self, offset, size):
#     def __init__(self, size, *args, **kwargs):
#     def deleted(self):
#     def data(self):
#     def as_email(self):
#     def __init__(self, folder_path):
#     def count(self):
#     def raw_messages(self):
#     def messages(self):
#     def all_messages(self):
#     def _messages(self, skip_deleted=True):


# Path: test/test_binfile/test_outlookexpress.py
from email import message
from eulcommon.binfile import outlookexpress
import unittest
import os

#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.




TEST_ROOT = os.path.dirname(__file__)
# Outlook Express 4.5 Mac folder directory inside fixtures directory
FIXTURE_FOLDER = os.path.join(TEST_ROOT, 'fixtures', 'oemacfolder')

class TestMacIndex(unittest.TestCase):
    index_filename = os.path.join(FIXTURE_FOLDER, 'Index')
    data_filename = os.path.join(FIXTURE_FOLDER, 'Mail')

    def test_basic_properties(self):
        idx = outlookexpress.MacIndex(self.index_filename)

        self.assertEqual(2, idx.total_messages)
        self.assertTrue(idx.sanity_check())


        not_idx = outlookexpress.MacIndex(self.data_filename)