示例#1
0
 public CellSearchByIconCommand(IUiTestContext context, string iconId, string countItem, HashSet <string> inventoryId)
 {
     _context     = context;
     _iconId      = iconId;
     _countItem   = countItem;
     _inventoryId = inventoryId;
 }
示例#2
0
 public CheckAndUseCommand(IUiTestContext context, Tuple <string, IUiTestChecker> checker, bool waitCheck, StringParam button)
 {
     _context   = context;
     _checker   = checker;
     _waitCheck = waitCheck;
     _button    = button;
 }
示例#3
0
 public DragAndDropCommand(IUiTestContext context, StringParam inventoryIdStart, int cellNumberStart, StringParam inventoryIdEnd, int cellNumberEnd)
 {
     _context          = context;
     _inventoryIdStart = inventoryIdStart;
     _cellNumberStart  = cellNumberStart;
     _inventoryIdEnd   = inventoryIdEnd;
     _cellNumberEnd    = cellNumberEnd;
 }
示例#4
0
        public IEnumerator Run(IUiTestContext context)
        {
            Steps    = new Steps(context);
            Context  = context;
            Commands = context.Commands;
            Cheats   = context.Cheats;

            var items = Condition();

            while (items.MoveNext())
            {
                _currenStep = items.Current;
                yield return(_currenStep.RunStep());

                if (_currenStep.CurrentState == TestStepState.Fail)
                {
                    yield break;
                }
            }
        }
示例#5
0
 public CellCountChecker(IUiTestContext context, StringParam cell, int cellIndex, int count)
 {
     _context = context;
     _count   = count;
     _cellGo  = context.Inventory.GetCells(cell.Item).GetCell(cellIndex);
 }
示例#6
0
 public UseActiveChecker(IUiTestContext context)
 {
     _context     = context;
     _useActiveGo = context.Main.GetContent(Screens.Main.Content.UseActive.Item).GetGO();
 }
示例#7
0
 public ClickCellCommand(IUiTestContext context, StringParam cellId, int cell)
 {
     _context = context;
     _cellId  = cellId;
     _cell    = cell;
 }
示例#8
0
 public WaitWorkbenchSawmillProgressCompleteCommand(IUiTestContext context)
 {
     _context  = context;
     _waitTime = 0;
 }
示例#9
0
 public WaitForSecondsCommand(IUiTestContext context, float seconds)
 {
     _context = context;
     _seconds = seconds;
 }
示例#10
0
 public TreeFelledChecker(IUiTestContext context, GameObject tree)
 {
     _context = context;
     _tree    = tree;
 }
示例#11
0
 public IconEmptyChecker(IUiTestContext context, StringParam cell, int cellIndex)
 {
     _context = context;
     _cellGo  = _context.Inventory.GetCells(cell.Item).GetCell(cellIndex);
 }
示例#12
0
 public PlayerMoveCommand(IUiTestContext context, Vector3 endPosition)
 {
     _context     = context;
     _endPosition = endPosition;
 }
示例#13
0
 public FindAndGoToSingleObjectCommand(IUiTestContext context, StringParam objectId)
 {
     _context  = context;
     _objectId = objectId;
 }
示例#14
0
 public UiTestRunner(IGameManager gameManager, int testNumber, IUiTestContext context)
 {
     _gameManager = gameManager;
     _testNumber  = testNumber;
     _context     = context;
 }
示例#15
0
 public CloseDialogCommand(IUiTestContext context, string buttonCloseId)
 {
     _context       = context;
     _buttonCloseId = buttonCloseId;
 }
示例#16
0
 protected abstract IEnumerator OnRun(IUiTestContext context);
示例#17
0
 public IEnumerator Run(IUiTestContext context)
 {
     yield return(OnRun(context));
 }
示例#18
0
 public AndCheckCommand(IUiTestContext context, List <IUiTestChecker> checks)
 {
     _context = context;
     _checks  = checks;
 }
示例#19
0
 public TreeCountChecker(IUiTestContext context, int treeCount)
 {
     _context   = context;
     _treeCount = treeCount;
     _inventory = _context.Inventory.GetContent(Screens.Inventory.Content.InventoryCount.Item).GetGO();
 }
示例#20
0
 public UseButtonClickCommand(IUiTestContext context, string key, string button)
 {
     Context = context;
     _key    = key;
     _button = button;
 }
示例#21
0
 public static void SetContext(IUiTestContext context)
 {
     Context = context;
 }
示例#22
0
 public Steps(IUiTestContext context)
 {
     UiTestStepBase.SetContext(context);
 }
示例#23
0
 public WaitItemActiveButtonCommand(IUiTestContext context, string button, string buttonId)
 {
     _context  = context;
     _button   = button;
     _buttonId = buttonId;
 }
示例#24
0
 public WaitDialogCommand(IUiTestContext context, StringParam dialog, bool active)
 {
     _active  = active;
     _context = context;
     _dialog  = dialog;
 }
示例#25
0
 public UseTargetChecker(IUiTestContext context, Vector3 targetPosition)
 {
     _targetGO       = context.Main.GetContent(Screens.Main.Content.UseTarget.Item).GetGO();
     _targetPosition = targetPosition;
 }
示例#26
0
 public ScreenshotCommand(IUiTestContext context)
 {
     _context = context;
 }
示例#27
0
 public static IEnumerator Run(IUiTestContext context)
 {
     yield return(context.Commands.WaitForSecondsCommand(1, new ResultData <SimpleCommandResult>()));
 }
示例#28
0
 public Commands(IUiTestContext context)
 {
     _context = context;
 }