Island: Add tests for IslandModeService
This commit is contained in:
parent
8f7e7f98e7
commit
4a91777019
|
@ -0,0 +1,16 @@
|
|||
import pytest
|
||||
from tests.monkey_island import InMemorySimulationRepository
|
||||
|
||||
from monkey_island.cc.services import IslandModeService
|
||||
from monkey_island.cc.services.mode.mode_enum import IslandModeEnum
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def island_mode_service():
|
||||
return IslandModeService(InMemorySimulationRepository())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("mode", list(IslandModeEnum))
|
||||
def test_set_mode(island_mode_service, mode):
|
||||
island_mode_service.set_mode(mode)
|
||||
assert island_mode_service.get_mode() == mode
|
Loading…
Reference in New Issue