public void get_all_unique_attributes() { var leaf = new StepLeaf(); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.Add(new Step().With("a:1,b:2")); leaf.Add(new Step().With("b:2,c:3,d:4")); leaf.Add(new Step().With("e:1")); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.GetAllUniqueAttributes().OrderBy(x => x).ShouldHaveTheSameElementsAs("a", "b", "c", "d", "e"); }
public void get_all_unique_attributes() { var leaf = new StepLeaf(); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.Add(new Step().With("a:1,b:2")); leaf.Add(new Step().With("b:2,c:3,d:4")); leaf.Add(new Step().With("e:1")); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.GetAllUniqueAttributes().ShouldHaveTheSameElementsAs("a", "b", "c", "d", "e"); }
public void clear_attribute() { var leaf = new StepLeaf(); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.Add(new Step().With("a:1,b:2")); leaf.Add(new Step().With("b:2,c:3,d:4")); leaf.Add(new Step().With("e:1")); leaf.Add(new Step().With("a:1,b:2,c:3")); leaf.ClearAttribute("a"); leaf.GetAllUniqueAttributes().ShouldHaveTheSameElementsAs("b", "c", "d", "e"); }
public string[] HiddenInputs(StepLeaf leaf) { IEnumerable <string> attributes = leaf.GetAllUniqueAttributes(); return(_cells.Where(x => !attributes.Contains(x.Key)).Select(x => x.Key).ToArray()); }
public IEnumerable <TextInput> InputsToDisplay(StepLeaf leaf) { IEnumerable <string> attributes = leaf.GetAllUniqueAttributes(); return(_inputs.Where(x => attributes.Contains(x.Cell.Key) || !x.Cell.HasDefault())); }
public IEnumerable<TextInput> InputsToDisplay(StepLeaf leaf) { IEnumerable<string> attributes = leaf.GetAllUniqueAttributes(); return _inputs.Where(x => attributes.Contains(x.Cell.Key) || !x.Cell.HasDefault()); }
public string[] HiddenInputs(StepLeaf leaf) { IEnumerable<string> attributes = leaf.GetAllUniqueAttributes(); return _cells.Where(x => !attributes.Contains(x.Key)).Select(x => x.Key).ToArray(); }