From: Jérôme Benoit Date: Mon, 1 Jul 2024 22:29:09 +0000 (+0200) Subject: test: add ConfigurationData enums tests X-Git-Tag: v1.3.7~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=47a41cfff7de841a931f5694dbcddaf235e91bdd;p=e-mobility-charging-stations-simulator.git test: add ConfigurationData enums tests Signed-off-by: Jérôme Benoit --- diff --git a/tests/types/ConfigurationData.test.ts b/tests/types/ConfigurationData.test.ts new file mode 100644 index 00000000..cb5ca2ea --- /dev/null +++ b/tests/types/ConfigurationData.test.ts @@ -0,0 +1,29 @@ +import { describe, it } from 'node:test' + +import { expect } from 'expect' + +import { + ApplicationProtocolVersion, + ConfigurationSection, + SupervisionUrlDistribution +} from '../../src/types/ConfigurationData.js' + +await describe('ConfigurationData test suite', async () => { + await it('Verify ConfigurationSection enumeration', () => { + expect(ConfigurationSection.log).toBe('log') + expect(ConfigurationSection.performanceStorage).toBe('performanceStorage') + expect(ConfigurationSection.worker).toBe('worker') + expect(ConfigurationSection.uiServer).toBe('uiServer') + }) + + await it('Verify SupervisionUrlDistribution enumeration', () => { + expect(SupervisionUrlDistribution.ROUND_ROBIN).toBe('round-robin') + expect(SupervisionUrlDistribution.RANDOM).toBe('random') + expect(SupervisionUrlDistribution.CHARGING_STATION_AFFINITY).toBe('charging-station-affinity') + }) + + await it('Verify ApplicationProtocolVersion enumeration', () => { + expect(ApplicationProtocolVersion.VERSION_11).toBe('1.1') + expect(ApplicationProtocolVersion.VERSION_20).toBe('2.0') + }) +})