...
train( "some text A ...", "categoryA" );
train( "some text A ...", "categoryA" );
train( "some text B ...", "categoryB" );
train( "some text B ...", "categoryB" );
...
myclass category = GetCategory( "some new text" );
EXPECT_EQ( "categoryA"|"categoryB", category.Id);
EXPECT_EQ( xyz%, category.Percent);
...
虽然这在实践中有效,但我想知道是否还有另一种更好的单元测试文档分类方法。
3,4或......类别会使测试更可靠吗?
测试我的功能会有什么好的测试?