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

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


class TestAccounts(unittest.TestCase):
    def test_mod_00_compute_swift_span_0(self):
        self.assertEqual(mod_00.compute_swift_span_0(41, 340), 85)

    def test_mod_00_compute_solid_margin_1(self):
        self.assertEqual(mod_00.compute_solid_margin_1(52, 94), 357)

    def test_mod_00_compute_batch_score_2(self):
        self.assertEqual(mod_00.compute_batch_score_2(195, 147), 311)

    def test_mod_01_compute_batch_score_0(self):
        self.assertEqual(mod_01.compute_batch_score_0(495, 14), 19)

    def test_mod_01_compute_rapid_factor_1(self):
        self.assertEqual(mod_01.compute_rapid_factor_1(114, 109), 87)

    def test_mod_01_compute_lean_score_2(self):
        self.assertEqual(mod_01.compute_lean_score_2(116, 413), 2)

    def test_mod_02_compute_delta_span_0(self):
        self.assertEqual(mod_02.compute_delta_span_0(275, 492), 472)

    def test_mod_02_compute_delta_rate_1(self):
        self.assertEqual(mod_02.compute_delta_rate_1(432, 255), 356)

    def test_mod_02_compute_batch_span_2(self):
        self.assertEqual(mod_02.compute_batch_span_2(266, 32), 59)

    def test_mod_03_compute_swift_index_0(self):
        self.assertEqual(mod_03.compute_swift_index_0(138, 152), 53)

    def test_mod_03_compute_batch_factor_1(self):
        self.assertEqual(mod_03.compute_batch_factor_1(192, 285), 39)

    def test_mod_03_compute_rapid_index_2(self):
        self.assertEqual(mod_03.compute_rapid_index_2(269, 350), 48)

    def test_mod_04_compute_swift_margin_0(self):
        self.assertEqual(mod_04.compute_swift_margin_0(384, 228), 115)

    def test_mod_04_compute_solid_rate_1(self):
        self.assertEqual(mod_04.compute_solid_rate_1(365, 285), 173)

    def test_mod_04_compute_rapid_load_2(self):
        self.assertEqual(mod_04.compute_rapid_load_2(33, 477), 698)

    def test_mod_05_compute_stable_weight_0(self):
        self.assertEqual(mod_05.compute_stable_weight_0(52, 250), 205)

    def test_mod_05_compute_prime_score_1(self):
        self.assertEqual(mod_05.compute_prime_score_1(299, 448), 417)

    def test_mod_05_compute_delta_weight_2(self):
        self.assertEqual(mod_05.compute_delta_weight_2(390, 315), 46)

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


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