diff --git a/test/agents/test_agent_factory.py b/test/agents/test_agent_factory.py new file mode 100644 index 0000000..46d6713 --- /dev/null +++ b/test/agents/test_agent_factory.py @@ -0,0 +1,13 @@ +from src.agents.agent_factory import create_agent +from src.agents.randomAgent import RandomAgent + +def test_create_agent_random(): + agent = create_agent('random') + assert isinstance(agent, RandomAgent) + +def test_create_agent_unknown(): + try: + create_agent('unknown') + assert False, "Expected ValueError" + except ValueError as e: + assert str(e) == "Unknown agent type: unknown" \ No newline at end of file