public void Schedule_the_child_workflow() { var description = new WorkflowDescription("1.0") { DefaultChildPolicy = "child", DefaultExecutionStartToCloseTimeout = TimeSpan.FromSeconds(3), DefaultLambdaRole = "lambdarole", DefaultTaskListName = "task", DefaultTaskPriority = 1, DefaultTaskStartToCloseTimeout = TimeSpan.FromSeconds(1), }; var item = new ChildWorkflowItem(_identity, _workflow.Object, description); var swfDecision = item.ScheduleDecisions().First().SwfDecision(); Assert.That(swfDecision.DecisionType, Is.EqualTo(DecisionType.StartChildWorkflowExecution)); var attr = swfDecision.StartChildWorkflowExecutionDecisionAttributes; Assert.That(attr.WorkflowType.Name, Is.EqualTo(WorkflowName)); Assert.That(attr.WorkflowType.Version, Is.EqualTo(Version)); Assert.That(attr.WorkflowId, Is.EqualTo(_scheduleIdentity.ToString())); Assert.That(attr.Control.As <ScheduleData>().PN, Is.EqualTo(_identity.PositionalName)); Assert.That(attr.ChildPolicy.Value, Is.EqualTo("child")); Assert.That(attr.ExecutionStartToCloseTimeout, Is.EqualTo("3")); Assert.That(attr.LambdaRole, Is.EqualTo("lambdarole")); Assert.That(attr.TaskList.Name, Is.EqualTo("task")); Assert.That(attr.TaskPriority, Is.EqualTo("1")); Assert.That(attr.TaskStartToCloseTimeout, Is.EqualTo("1")); Assert.That(attr.TagList, Is.Empty); }
private void ShowSuccess(GatewayComponent gatewayComponent, Person person, PaymentInfo paymentInfo, PaymentSchedule schedule, FinancialPaymentDetail paymentDetail, RockContext rockContext) { tdTransactionCodeReceipt.Description = TransactionCode; tdTransactionCodeReceipt.Visible = !string.IsNullOrWhiteSpace(TransactionCode); tdScheduleId.Description = ScheduleId.ToString(); tdScheduleId.Visible = ScheduleId.HasValue; tdNameReceipt.Description = paymentInfo.FullName; tdPhoneReceipt.Description = paymentInfo.Phone; tdEmailReceipt.Description = paymentInfo.Email; tdAddressReceipt.Description = string.Format("{0} {1}, {2} {3}", paymentInfo.Street1, paymentInfo.City, paymentInfo.State, paymentInfo.PostalCode); rptAccountListReceipt.DataSource = GetSelectedAccounts().Where(a => a.Amount != 0); rptAccountListReceipt.DataBind(); tdTotalReceipt.Description = paymentInfo.Amount.ToString("C"); tdPaymentMethodReceipt.Description = paymentInfo.CurrencyTypeValue.Description; string acctNumber = paymentInfo.MaskedNumber; if (string.IsNullOrWhiteSpace(acctNumber) && paymentDetail != null && !string.IsNullOrWhiteSpace(paymentDetail.AccountNumberMasked)) { acctNumber = paymentDetail.AccountNumberMasked; } tdAccountNumberReceipt.Description = acctNumber; tdAccountNumberReceipt.Visible = !string.IsNullOrWhiteSpace(acctNumber); tdWhenReceipt.Description = schedule != null?schedule.ToString() : "Today"; pnlConfirmation.Visible = false; pnlSuccess.Visible = true; }
public string ConvertToSearch() { var cc = DbUtil.Db.ScratchPadCondition(); cc.Reset(); var c = cc.AddNewClause(QueryType.OrgSearchMember, CompareType.Equal, "1,True"); if (Name.HasValue()) { c.OrgName = Name; } if (ProgramId != 0) { c.Program = ProgramId.ToString(); } if (DivisionId != 0) { c.Division = DivisionId.ToString(); } if (StatusId != 0) { c.OrgStatus = StatusId.ToString(); } if (TypeId != 0) { c.OrgType2 = TypeId ?? 0; } if (CampusId != 0) { c.Campus = CampusId.ToString(); } if (ScheduleId != 0) { c.Schedule = ScheduleId.ToString(); } if (OnlineReg != 0) { c.OnlineReg = OnlineReg.ToString(); } cc.Save(DbUtil.Db); return("/Query/" + cc.Id); }
public void ToStringOutputsProperties() { Assert.Equal("A12345-20190102:P-Create", _test.ToString()); }
public void Should_return_aws_decision_to_schedule_the_activity() { var swfDecision = _scheduleActivityDecision.SwfDecision(); Assert.That(swfDecision.DecisionType, Is.EqualTo(DecisionType.ScheduleActivityTask)); Assert.That(swfDecision.ScheduleActivityTaskDecisionAttributes.ActivityId, Is.EqualTo(_scheduleId.ToString())); Assert.That(swfDecision.ScheduleActivityTaskDecisionAttributes.ActivityType.Name, Is.EqualTo("Download")); Assert.That(swfDecision.ScheduleActivityTaskDecisionAttributes.ActivityType.Version, Is.EqualTo("1.0")); Assert.That(swfDecision.ScheduleActivityTaskDecisionAttributes.Control.As <ScheduleData>().PN, Is.EqualTo("First")); }