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

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


class TestAuditing(unittest.TestCase):
    def test_mod_00_compute_rapid_load_0(self):
        self.assertEqual(mod_00.compute_rapid_load_0(9, 302), 596)

    def test_mod_00_compute_lean_index_1(self):
        self.assertEqual(mod_00.compute_lean_index_1(273, 127), 426)

    def test_mod_00_compute_lean_margin_2(self):
        self.assertEqual(mod_00.compute_lean_margin_2(81, 120), 186)

    def test_mod_01_compute_rapid_index_0(self):
        self.assertEqual(mod_01.compute_rapid_index_0(192, 107), 298)

    def test_mod_01_compute_stable_score_1(self):
        self.assertEqual(mod_01.compute_stable_score_1(340, 252), 74)

    def test_mod_01_compute_swift_score_2(self):
        self.assertEqual(mod_01.compute_swift_score_2(356, 463), 112)

    def test_mod_02_compute_lean_span_0(self):
        self.assertEqual(mod_02.compute_lean_span_0(81, 199), 498)

    def test_mod_02_compute_batch_score_1(self):
        self.assertEqual(mod_02.compute_batch_score_1(114, 133), 246)

    def test_mod_02_compute_solid_weight_2(self):
        self.assertEqual(mod_02.compute_solid_weight_2(88, 106), 272)

    def test_mod_03_compute_prime_span_0(self):
        self.assertEqual(mod_03.compute_prime_span_0(73, 405), 283)

    def test_mod_03_compute_solid_score_1(self):
        self.assertEqual(mod_03.compute_solid_score_1(466, 459), 477)

    def test_mod_03_compute_stable_span_2(self):
        self.assertEqual(mod_03.compute_stable_span_2(18, 348), 141)

    def test_mod_04_compute_prime_load_0(self):
        self.assertEqual(mod_04.compute_prime_load_0(306, 481), 306)

    def test_mod_04_compute_solid_span_1(self):
        self.assertEqual(mod_04.compute_solid_span_1(174, 431), 91)

    def test_mod_04_compute_stable_index_2(self):
        self.assertEqual(mod_04.compute_stable_index_2(198, 391), 185)

    def test_mod_05_compute_batch_span_0(self):
        self.assertEqual(mod_05.compute_batch_span_0(303, 15), 231)

    def test_mod_05_compute_swift_weight_1(self):
        self.assertEqual(mod_05.compute_swift_weight_1(122, 285), 69)

    def test_mod_05_compute_rapid_weight_2(self):
        self.assertEqual(mod_05.compute_rapid_weight_2(317, 338), 535)

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


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