Exemplo n.º 1
0
        public void GetFieldIndex()
        {
            var schema = new TableSchema
            {
                Fields = new List <TableFieldSchema>
                {
                    new TableFieldSchema {
                        Name = "foo"
                    },
                    new TableFieldSchema {
                        Name = "bar"
                    }
                }
            };

            Assert.Equal(1, schema.GetFieldIndex("bar"));
            Assert.Throws <KeyNotFoundException>(() => schema.GetFieldIndex("qux"));
        }
Exemplo n.º 2
0
        public void GetFieldIndex()
        {
            var schema = new TableSchema
            {
                Fields = new List <TableFieldSchema>
                {
                    new TableFieldSchema {
                        Name = "foo"
                    },
                    new TableFieldSchema {
                        Name = "bar"
                    }
                }
            };

            Assert.Equal(1, schema.GetFieldIndex("bar"));
        }