コード例 #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
ファイル: StepLeafTester.cs プロジェクト: larsw/storyteller
        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
ファイル: Table.cs プロジェクト: adymitruk/storyteller
 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
ファイル: Table.cs プロジェクト: adymitruk/storyteller
 public string[] HiddenInputs(StepLeaf leaf)
 {
     IEnumerable<string> attributes = leaf.GetAllUniqueAttributes();
     return _cells.Where(x => !attributes.Contains(x.Key)).Select(x => x.Key).ToArray();
 }