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

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


class TestManifest(unittest.TestCase):
    def test_mod_00_compute_stable_weight_0(self):
        self.assertEqual(mod_00.compute_stable_weight_0(458, 56), 255)

    def test_mod_00_compute_stable_factor_1(self):
        self.assertEqual(mod_00.compute_stable_factor_1(161, 367), 134)

    def test_mod_00_compute_prime_load_2(self):
        self.assertEqual(mod_00.compute_prime_load_2(201, 219), 273)

    def test_mod_01_compute_prime_span_0(self):
        self.assertEqual(mod_01.compute_prime_span_0(138, 235), 30)

    def test_mod_01_compute_batch_load_1(self):
        self.assertEqual(mod_01.compute_batch_load_1(204, 37), 334)

    def test_mod_01_compute_stable_score_2(self):
        self.assertEqual(mod_01.compute_stable_score_2(112, 190), 38)

    def test_mod_02_compute_rapid_span_0(self):
        self.assertEqual(mod_02.compute_rapid_span_0(406, 444), 18)

    def test_mod_02_compute_stable_load_1(self):
        self.assertEqual(mod_02.compute_stable_load_1(333, 438), 393)

    def test_mod_02_compute_lean_rate_2(self):
        self.assertEqual(mod_02.compute_lean_rate_2(448, 75), 31)

    def test_mod_03_compute_swift_span_0(self):
        self.assertEqual(mod_03.compute_swift_span_0(138, 175), 327)

    def test_mod_03_compute_delta_span_1(self):
        self.assertEqual(mod_03.compute_delta_span_1(30, 122), 182)

    def test_mod_03_compute_solid_score_2(self):
        self.assertEqual(mod_03.compute_solid_score_2(20, 342), 244)

    def test_mod_04_compute_delta_factor_0(self):
        self.assertEqual(mod_04.compute_delta_factor_0(442, 326), 188)

    def test_mod_04_compute_rapid_span_1(self):
        self.assertEqual(mod_04.compute_rapid_span_1(475, 12), 330)

    def test_mod_04_compute_rapid_load_2(self):
        self.assertEqual(mod_04.compute_rapid_load_2(500, 202), 56)

    def test_mod_05_compute_batch_score_0(self):
        self.assertEqual(mod_05.compute_batch_score_0(82, 452), 32)

    def test_mod_05_compute_prime_index_1(self):
        self.assertEqual(mod_05.compute_prime_index_1(122, 141), 61)

    def test_mod_05_compute_prime_load_2(self):
        self.assertEqual(mod_05.compute_prime_load_2(400, 141), 39)

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


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