예제 #1
0
        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");
        }
예제 #2
0
        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");
        }
예제 #3
0
        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");
        }
예제 #4
0
파일: Table.cs 프로젝트: larsw/storyteller
        public string[] HiddenInputs(StepLeaf leaf)
        {
            IEnumerable <string> attributes = leaf.GetAllUniqueAttributes();

            return(_cells.Where(x => !attributes.Contains(x.Key)).Select(x => x.Key).ToArray());
        }
예제 #5
0
파일: Table.cs 프로젝트: larsw/storyteller
        public IEnumerable <TextInput> InputsToDisplay(StepLeaf leaf)
        {
            IEnumerable <string> attributes = leaf.GetAllUniqueAttributes();

            return(_inputs.Where(x => attributes.Contains(x.Cell.Key) || !x.Cell.HasDefault()));
        }
예제 #6
0
 public IEnumerable<TextInput> InputsToDisplay(StepLeaf leaf)
 {
     IEnumerable<string> attributes = leaf.GetAllUniqueAttributes();
     return _inputs.Where(x => attributes.Contains(x.Cell.Key) || !x.Cell.HasDefault());
 }
예제 #7
0
 public string[] HiddenInputs(StepLeaf leaf)
 {
     IEnumerable<string> attributes = leaf.GetAllUniqueAttributes();
     return _cells.Where(x => !attributes.Contains(x.Key)).Select(x => x.Key).ToArray();
 }