本文整理汇总了TypeScript中mocks/types.ControllerTestFactory.default方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ControllerTestFactory.default方法的具体用法?TypeScript ControllerTestFactory.default怎么用?TypeScript ControllerTestFactory.default使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mocks/types.ControllerTestFactory
的用法示例。
在下文中一共展示了ControllerTestFactory.default方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _accountModel_: AccountModelMock, _account_: Account): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
accountModel = _accountModel_;
account = _account_;
accountEditController = controllerTest("AccountEditController") as AccountEditController;
}));
示例2: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _categoryModel_: CategoryModelMock, _category_: Category): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
categoryModel = _categoryModel_;
category = _category_;
categoryEditController = controllerTest("CategoryEditController") as CategoryEditController;
}));
示例3: controllerTest
it("should focus the schedule when a schedule id is specified", (): void => {
$state.params.id = "1";
scheduleIndexController = controllerTest("ScheduleIndexController", {$state}) as ScheduleIndexController;
scheduleIndexController.tableActions.focusRow = sinon.stub();
$timeout.flush();
(scheduleIndexController.tableActions as OgTableActionHandlers).focusRow.should.have.been.calledWith(0);
});
示例4: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _payeeModel_: PayeeModelMock, _payee_: Payee): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
payeeModel = _payeeModel_;
payee = _payee_;
payeeEditController = controllerTest("PayeeEditController") as PayeeEditController;
}));
示例5: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _transactionModel_: TransactionModelMock, _transaction_: Transaction): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
transactionModel = _transactionModel_;
transaction = _transaction_;
transactionFlagController = controllerTest("TransactionFlagController") as TransactionFlagController;
}));
示例6: controllerTest
it("should focus the category when a category id is specified", (): void => {
$state.params.id = "1";
categoryIndexController = controllerTest("CategoryIndexController", {$state}) as CategoryIndexController;
categoryIndexController.tableActions.focusRow = sinon.stub();
$timeout.flush();
(categoryIndexController.tableActions as OgTableActionHandlers).focusRow.should.have.been.calledWith(0);
});
示例7: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _securityModel_: SecurityModelMock, _security_: Security): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
securityModel = _securityModel_;
security = _security_;
securityEditController = controllerTest("SecurityEditController") as SecurityEditController;
}));
示例8: controllerTest
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _$window_: angular.IWindowService, _account_: Account): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
$window = _$window_;
account = _account_;
accountReconcileController = controllerTest("AccountReconcileController") as AccountReconcileController;
}));
示例9: controllerTest
beforeEach(inject((_$window_: angular.IWindowService, _$uibModal_: UibModalMock, controllerTest: ControllerTestFactory, _accountModel_: AccountModelMock, _accountsWithBalances_: Accounts): void => {
$window = _$window_;
$uibModal = _$uibModal_;
accountModel = _accountModel_;
accountsWithBalances = _accountsWithBalances_;
$window.$ = $;
accountIndexController = controllerTest("AccountIndexController", {accounts: accountsWithBalances}) as AccountIndexController;
}));
示例10: startOfDay
beforeEach((): void => {
transaction = {
transaction_type: "Basic",
next_due_date: startOfDay(new Date()),
autoFlag: false
};
scheduleEditController = controllerTest("ScheduleEditController", {schedule: null}) as ScheduleEditController;
});