@@ -207,11 +207,11 @@ private static KeyValuePair<string, DataViewType> P(string name, DataViewType ty
207
207
public void AssertStaticSimple ( )
208
208
{
209
209
var env = new MLContext ( 0 ) ;
210
- var schema = SimpleSchemaUtils . Create ( env ,
211
- P ( "hello" , TextDataViewType . Instance ) ,
212
- P ( "my" , new VectorType ( NumberDataViewType . Int64 , 5 ) ) ,
213
- P ( "friend" , new KeyType ( typeof ( uint ) , 3 ) ) ) ;
214
- var view = new EmptyDataView ( env , schema ) ;
210
+ var schemaBuilder = new SchemaBuilder ( ) ;
211
+ schemaBuilder . AddColumn ( "hello" , TextDataViewType . Instance ) ;
212
+ schemaBuilder . AddColumn ( "my" , new VectorType ( NumberDataViewType . Int64 , 5 ) ) ;
213
+ schemaBuilder . AddColumn ( "friend" , new KeyType ( typeof ( uint ) , 3 ) ) ;
214
+ var view = new EmptyDataView ( env , schemaBuilder . GetSchema ( ) ) ;
215
215
216
216
view . AssertStatic ( env , c => new
217
217
{
@@ -231,11 +231,12 @@ public void AssertStaticSimple()
231
231
public void AssertStaticSimpleFailure ( )
232
232
{
233
233
var env = new MLContext ( 0 ) ;
234
- var schema = SimpleSchemaUtils . Create ( env ,
235
- P ( "hello" , TextDataViewType . Instance ) ,
236
- P ( "my" , new VectorType ( NumberDataViewType . Int64 , 5 ) ) ,
237
- P ( "friend" , new KeyType ( typeof ( uint ) , 3 ) ) ) ;
238
- var view = new EmptyDataView ( env , schema ) ;
234
+ var schemaBuilder = new SchemaBuilder ( ) ;
235
+ schemaBuilder . AddColumn ( "hello" , TextDataViewType . Instance ) ;
236
+ schemaBuilder . AddColumn ( "my" , new VectorType ( NumberDataViewType . Int64 , 5 ) ) ;
237
+ schemaBuilder . AddColumn ( "friend" , new KeyType ( typeof ( uint ) , 3 ) ) ;
238
+
239
+ var view = new EmptyDataView ( env , schemaBuilder . GetSchema ( ) ) ;
239
240
240
241
Assert . ThrowsAny < Exception > ( ( ) =>
241
242
view . AssertStatic ( env , c => new
0 commit comments