当前位置: 首页>>代码示例>>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;未经允许,请勿转载。