"""Generated tests for the shipping domain."""
import unittest

from megalith.shipping import mod_00 as mod_00
from megalith.shipping import mod_01 as mod_01
from megalith.shipping import mod_02 as mod_02
from megalith.shipping import mod_03 as mod_03
from megalith.shipping import mod_04 as mod_04
from megalith.shipping import mod_05 as mod_05


class TestShipping(unittest.TestCase):
    def test_mod_00_compute_lean_load_0(self):
        self.assertEqual(mod_00.compute_lean_load_0(317, 26), 557)

    def test_mod_00_compute_solid_margin_1(self):
        self.assertEqual(mod_00.compute_solid_margin_1(466, 374), 75)

    def test_mod_00_compute_batch_score_2(self):
        self.assertEqual(mod_00.compute_batch_score_2(291, 375), 453)

    def test_mod_01_compute_stable_weight_0(self):
        self.assertEqual(mod_01.compute_stable_weight_0(215, 284), 522)

    def test_mod_01_compute_prime_weight_1(self):
        self.assertEqual(mod_01.compute_prime_weight_1(98, 327), 81)

    def test_mod_01_compute_lean_index_2(self):
        self.assertEqual(mod_01.compute_lean_index_2(40, 140), 88)

    def test_mod_02_compute_swift_span_0(self):
        self.assertEqual(mod_02.compute_swift_span_0(317, 404), 594)

    def test_mod_02_compute_lean_weight_1(self):
        self.assertEqual(mod_02.compute_lean_weight_1(443, 293), 113)

    def test_mod_02_compute_lean_load_2(self):
        self.assertEqual(mod_02.compute_lean_load_2(362, 104), 164)

    def test_mod_03_compute_solid_weight_0(self):
        self.assertEqual(mod_03.compute_solid_weight_0(420, 163), 107)

    def test_mod_03_compute_batch_margin_1(self):
        self.assertEqual(mod_03.compute_batch_margin_1(278, 312), 438)

    def test_mod_03_compute_delta_index_2(self):
        self.assertEqual(mod_03.compute_delta_index_2(375, 123), 75)

    def test_mod_04_compute_lean_load_0(self):
        self.assertEqual(mod_04.compute_lean_load_0(244, 459), 392)

    def test_mod_04_compute_prime_factor_1(self):
        self.assertEqual(mod_04.compute_prime_factor_1(233, 466), 318)

    def test_mod_04_compute_delta_index_2(self):
        self.assertEqual(mod_04.compute_delta_index_2(449, 98), 50)

    def test_mod_05_compute_rapid_index_0(self):
        self.assertEqual(mod_05.compute_rapid_index_0(20, 192), 409)

    def test_mod_05_compute_solid_weight_1(self):
        self.assertEqual(mod_05.compute_solid_weight_1(73, 309), 562)

    def test_mod_05_compute_swift_span_2(self):
        self.assertEqual(mod_05.compute_swift_span_2(168, 49), 56)

    def test_record_display_and_normalize(self):
        rec = mod_00.ShippingRecord00(ident=7, name='sample', value=250.0)
        self.assertEqual(rec.display(), 'shipping:sample#0007')
        self.assertEqual(rec.normalized(), 100.0)


if __name__ == "__main__":
    unittest.main()
