本文整理匯總了TypeScript中mocks/types.ControllerTestFactory類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ControllerTestFactory類的具體用法?TypeScript ControllerTestFactory怎麽用?TypeScript ControllerTestFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ControllerTestFactory類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _payeeModel_: PayeeModelMock, _payee_: Payee): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
payeeModel = _payeeModel_;
payee = _payee_;
payeeEditController = controllerTest("PayeeEditController") as PayeeEditController;
}));
示例2: beforeEach
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _securityModel_: SecurityModelMock, _security_: Security): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
securityModel = _securityModel_;
security = _security_;
securityEditController = controllerTest("SecurityEditController") as SecurityEditController;
}));
示例3: beforeEach
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _categoryModel_: CategoryModelMock, _category_: Category): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
categoryModel = _categoryModel_;
category = _category_;
categoryEditController = controllerTest("CategoryEditController") as CategoryEditController;
}));
示例4: beforeEach
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _transactionModel_: TransactionModelMock, _transaction_: Transaction): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
transactionModel = _transactionModel_;
transaction = _transaction_;
transactionFlagController = controllerTest("TransactionFlagController") as TransactionFlagController;
}));
示例5: beforeEach
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;
}));
示例6: beforeEach
beforeEach(inject((_controllerTest_: ControllerTestFactory, _$uibModalInstance_: UibModalInstanceMock, _accountModel_: AccountModelMock, _account_: Account): void => {
controllerTest = _controllerTest_;
$uibModalInstance = _$uibModalInstance_;
accountModel = _accountModel_;
account = _account_;
accountEditController = controllerTest("AccountEditController") as AccountEditController;
}));
示例7: beforeEach
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;
}));
示例8: 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);
});
示例9: 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);
});
示例10: startOfDay
beforeEach((): void => {
transaction = {
transaction_type: "Basic",
next_due_date: startOfDay(new Date()),
autoFlag: false
};
scheduleEditController = controllerTest("ScheduleEditController", {schedule: null}) as ScheduleEditController;
});