/// <summary> /// 删除 /// </summary> public override void EntityDelete() { SampleRule rule = new SampleRule(); Sample entity = EntityGet(); rule.RDelete(entity); }
public void HandleClosing(CancelEventArgs args) { if (OrderProcessing.IsModified) { switch (MessageBox.Show("Save changes to the Sample Data?", "Saving changes", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)) { case MessageBoxResult.Cancel: args.Cancel = true; return; case MessageBoxResult.Yes: OrderProcessing.Save(); break; } } if (SampleRule.IsModified) { switch (MessageBox.Show("Save changes to the Sample Rule?", "Saving changes", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)) { case MessageBoxResult.Cancel: args.Cancel = true; return; case MessageBoxResult.Yes: SampleRule.Save(); break; } } }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { SampleRule rule = new SampleRule(); gridView1.GridControl.DataSource = rule.RShow2(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag")); gridView1.GridControl.Show(); }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { SampleRule rule = new SampleRule(); gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1)); gridView1.GridControl.Show(); ProcessGrid.SetGridEdit(gridView1, new string[] { "EventStatus" }, true); }
public void TestValidate() { var rule = new SampleRule("サンプルルール"); var target = new ValidationTarget("Assets/VitDeck/Validator/Tests/SampleRule"); var result = rule.Validate(target); Assert.That(result.RuleName, Is.EqualTo("サンプルルール")); Assert.That(result.Issues.Count, Is.AtLeast(1)); }
/// <summary> /// 修改 /// </summary> public override void EntityUpdate() { SampleRule rule = new SampleRule(); Sample entity = EntityGet(); SampleDts[] entitydts = EntityDtsGet(); entity.SubmitFlag = this.HTSubmitFlagUpdateGet(); rule.RUpdate(entity, entitydts); }
/// <summary> /// 新增 /// </summary> public override int EntityAdd() { SampleRule rule = new SampleRule(); Sample entity = EntityGet(); SampleDts[] entitydts = EntityDtsGet(); entity.SubmitFlag = this.HTSubmitFlagInsertGet(); rule.RAdd(entity, entitydts); return(entity.ID); }
public void TestInitial(Browser browser, string text) { var rule = new SampleRule(configuration, browser); rule.OpenPage(); rule.SetSearchText(text); rule.SubmitSearch(); rule.ValidSearch(); rule.ClosePage(); //rule.SampleRuleTeste(); Assert.True(true); // insira aqui sua validação do test }
public void GetManifestRuleShouldReturnAManifestRuleWithCorrectConfigurationAction([Frozen] IGetsManifestRuleIdentifier identifierFactory, [Frozen, ManifestModel] ValidatorBuilderContext context, RuleBuilder <SampleRule> sut, [ManifestModel] ManifestRuleIdentifier identifier, string stringPropValue) { Mock.Get(identifierFactory) .Setup(x => x.GetManifestRuleIdentifier(typeof(SampleRule), It.IsAny <ValidatorBuilderContext>(), It.IsAny <string>())) .Returns(identifier); sut.ConfigureRule(r => r.StringProp = stringPropValue); sut.Dependencies.Clear(); var rule = sut.GetManifestValue().Rules.Single(); var sampleRule = new SampleRule(); rule.RuleConfiguration(sampleRule); Assert.That(sampleRule.StringProp, Is.EqualTo(stringPropValue), "Configuration action applied correctly"); }