tdd

    2热度

    1回答

    我想检查一个向量在gtest中是否为空,但我想更多地了解如何检查匹配器的否定。 我通常ckeck大小大于零 EXPECT_THAT(vector.size(), Gt(0)); ,我知道我可以写我自己的匹配 MATCHER(IsNotEmpty, !negation ? "isn't empty" : "is empty") { if (!arg.empty()) { return

    0热度

    1回答

    想知道如果我这样做是正确的? 业务规则 Customer可以不在系统中存在W/O Property。 当我们删除Property时,Customer也被删除。 该只有时间我添加一个Customer是当我添加一个Property。 (见下文) 的POST:JSON数据从客户端 // http://localhost:3541/api/property { City: "Demo Cit

    0热度

    1回答

    我有像这样 public class Foo : ICompletable { public IAmCompleted { get; set;} // from interface private IFooCollab collab; public Foo(IFooCollab collab) { this.collab = collab; }

    3热度

    1回答

    这三种选择之一是:google test,boost.test和catch。 我想要一些健壮的东西,没有那么多的依赖关系,并且如果需要的话能够支持C++ 14/C++ 17。 另一个问题,你知道航空电子设备/太空领域的大公司使用哪个框架?

    1热度

    3回答

    我想嘲笑一个具体的类,具体SortedDictionary。 上下文: 我有定义为低于LocationMapper类: public class LocationMapper { private SortedDictionary<string, Location>() locationMap; public LocationMapper() { this.

    0热度

    1回答

    我无法使用工厂女孩创建有效的评论工厂。我的评论模型属于可评论的并且是多态的。我已经尝试了一大堆不同的东西,但在那一刻,我的大多数测试中得到这个错误: ActiveRecord::RecordInvalid: Validation failed: User can't be blank, Outlet can't be blank 我不知道为什么它不经过验证,尤其是因为我的评论模型验证

    2热度

    1回答

    我开始通过在Laravel的HTTP测试中进行实验来学习TDD。这是我的测试功能: public function testLoginUsingUserDeni() { $response = $this->json('POST', '/api/v1/login', [ 'email' => '[email protected]', 'password' =>

    0热度

    1回答

    我正在编写一些学习项目来实现TDD,webpack。 我用的WebPack 2以下配置: const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); //const ExtractTextPlugin =

    0热度

    1回答

    我只注意到奇怪的Rspec行为。我不知道这是Rspec的错误还是我的测试方法不正确。 我有这个控制器测试(我省掉不必要件): describe 'GET #new' do def get_new(group_id = nil) get :new, group_id: group_id end context 'with logged in user' do contex

    0热度

    1回答

    我试图修复一些我在我的评论控制器中编写的测试。截至目前,我目前的测试中,我得到这个错误: Failure/Error: @outlet = Outlet.find(params[:comment][:outlet_id]) ActiveRecord::RecordNotFound: Couldn't find Outlet with 'id'= 下面是一些测试的例子 descri