from dongri_task import *
import pytest
import allure

'''
运行：
pytest --alluredir=./allure-results
生成报告：
allure serve ./allure-results
'''



# 测试用例示例
@allure.story("仓库检查测试")
def test_checkStoreRoom():
    result = task_checkStoreRoom().run()
    assert result is True, "仓库检查失败"

@allure.story("参与集结测试") 
def test_checkConflicts():
    result = task_checkConfilits().run()
    assert result is True, "参与集结失败"

@allure.story("活动检查测试")
def test_checkActivities():
    result = task_checkActivities().run()
    assert result is True, "活动检查失败"

@allure.story("统帅测试")
def test_checkMaster():
    result = task_checkMaster().run()
    assert result is True, "统帅检查失败"

@allure.story("战斗小怪兽测试")
def test_fightMonster():
    result = task_fightMonster(False, False,False).run()
    assert result is True, "战斗失败"

@allure.story("帮助检查测试")
def test_checkHelp():
    result = task_checkHelp().run()
    assert result is True, "帮助检查失败"

@allure.story("联盟总动员测试")
def test_activity_lianmeng():
    result = task_activity_lianmeng().run()
    assert result is True, "联盟总动员失败"

@allure.story("佣兵测试")
def test_fight_yongbing():
    result = task_fight_yongbing(True).run()
    assert result is True, "佣兵战斗失败"

@allure.story("采集测试")
def test_collect():
    result = task_collect([4,3,2,1]).run()
    assert result is True, "采集失败"

@allure.story("训练测试")
def test_train():
    result = task_train("lv9").run()
    assert result is True, "训练失败"

@allure.story("灯塔测试")
def test_information():
    result = task_information().run()
    assert result is True, "灯塔信息失败"

@allure.story("建筑或研究测试")
def test_buildOrResearch():
    result = check_buildOrResearch().run()
    assert result is True, "建筑或研究失败"

@allure.story("捐献测试")
def test_checkDonata():
    result = task_checkDonata().run()
    assert result is True, "捐献失败"

@allure.story("返回所有线路测试")
def test_returnAllLine():
    result = task_returnAllLine().run()
    assert result is True, "返回所有线路失败"

@allure.story("参与队伍测试")
def test_paticipateInTeam():
    result = task_paticipateInTeam().run()
    assert result is True, "参与队伍失败"

@allure.story("战斗吉娜测试")
def test_fight_jina():
    result = task_fight_jina(True).run()
    assert result is True, "战斗吉娜失败"

