我有一个必须填写几个字段的表格。但是,只有一个字段是强制性的。所以,我想出了以下规范:
[Subject(typeof(CompanyHomeController))]
public class when_the_save_button_is_clicked
{
private It should_verify_that_the_company_name_has_been_filled;
private It should_show_some_text_next_to_the_company_field_if_it_has_not_been_filled;
private It should_submit_all_the_details_on_the_form_if_there_are_no_errors;
private It should_take_the_user_back_to_the_list_of_companies;
}
现在我想实现它,但我很困惑,因为它听起来很像功能测试,我必须使用类似 mvccontrib.watin dll 的东西。我对它确实是功能测试吗?我是否为 BDD 制定了“错误”的规范?