當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript types.ControllerTestFactory類代碼示例

本文整理匯總了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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:edit.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:edit.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:edit.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:flag.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:reconcile.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:edit.ts

示例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;
	}));
開發者ID:scottohara,項目名稱:loot,代碼行數:8,代碼來源:index.ts

示例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);
	});
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:index.ts

示例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);
	});
開發者ID:scottohara,項目名稱:loot,代碼行數:7,代碼來源:index.ts

示例10: startOfDay

		beforeEach((): void => {
			transaction = {
				transaction_type: "Basic",
				next_due_date: startOfDay(new Date()),
				autoFlag: false
			};
			scheduleEditController = controllerTest("ScheduleEditController", {schedule: null}) as ScheduleEditController;
		});
開發者ID:scottohara,項目名稱:loot,代碼行數:8,代碼來源:edit.ts


注:本文中的mocks/types.ControllerTestFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。