public void FindRecords_GetOutputs_Expected_One_Output() { DsfFindRecordsActivity testAct = new DsfFindRecordsActivity(); IBinaryDataList outputs = testAct.GetOutputs(); var res = outputs.FetchAllEntries().Count; // remove test datalist ;) DataListRemoval(outputs.UID); Assert.AreEqual(1, res); }
public void GetActivityFieldsOffDsfFindRecordsActivityExpectedAllFindMissingFieldsToBeReturned() { DsfFindRecordsActivity activity = new DsfFindRecordsActivity(); activity.FieldsToSearch = "[[FieldsToSearch]]"; activity.SearchCriteria = "[[SearchCriteria]]"; activity.Result = "[[Result]]"; activity.StartIndex = "[[StartIndex]]"; Dev2FindMissingStrategyFactory fac = new Dev2FindMissingStrategyFactory(); IFindMissingStrategy strategy = fac.CreateFindMissingStrategy(enFindMissingType.StaticActivity); List <string> actual = strategy.GetActivityFields(activity); List <string> expected = new List <string> { "[[FieldsToSearch]]", "[[SearchCriteria]]", "[[Result]]", "[[StartIndex]]" }; CollectionAssert.AreEqual(expected, actual); }
protected override void BuildDataList() { List <Tuple <string, string> > variableList; ScenarioContext.Current.TryGetValue("variableList", out variableList); if (variableList == null) { variableList = new List <Tuple <string, string> >(); ScenarioContext.Current.Add("variableList", variableList); } variableList.Add(new Tuple <string, string>(ResultVariable, "")); BuildShapeAndTestData(); string recordsetName; ScenarioContext.Current.TryGetValue("recordset", out recordsetName); var searchType = ScenarioContext.Current.Get <string>("searchType"); var criteria = ScenarioContext.Current.Get <string>("criteria"); var findRecordsIndex = new DsfFindRecordsActivity { FieldsToSearch = recordsetName + "()", Result = ResultVariable, SearchCriteria = criteria, SearchType = searchType, RequireAllFieldsToMatch = false }; TestStartNode = new FlowStep { Action = findRecordsIndex }; ScenarioContext.Current.Add("activity", findRecordsIndex); }
public void GetActivityFieldsOffDsfFindRecordsActivityExpectedAllFindMissingFieldsToBeReturned() { DsfFindRecordsActivity activity = new DsfFindRecordsActivity(); activity.FieldsToSearch = "[[FieldsToSearch]]"; activity.SearchCriteria = "[[SearchCriteria]]"; activity.Result = "[[Result]]"; activity.StartIndex = "[[StartIndex]]"; Dev2FindMissingStrategyFactory fac = new Dev2FindMissingStrategyFactory(); IFindMissingStrategy strategy = fac.CreateFindMissingStrategy(enFindMissingType.StaticActivity); List<string> actual = strategy.GetActivityFields(activity); List<string> expected = new List<string> { "[[FieldsToSearch]]", "[[SearchCriteria]]", "[[Result]]", "[[StartIndex]]" }; CollectionAssert.AreEqual(expected, actual); }