简体   繁体   English

在GAE上使用Siena时如何编写单元测试

[英]How to write unittests when using Siena on GAE

I'm writing a webapp which uses Wicket and Siena/gae as datastore. 我正在编写一个使用Wicket和Siena / gae作为数据存储的webapp。 Now I want to write some decent unittests for my services. 现在,我想为我的服务编写一些不错的单元测试。 Is there already a toolset or classes that make the mocking of siena models a bit more easy? 是否已经有一个工具集或类可以简化siena模型的建模?

Note that I don't use playframework. 请注意,我不使用playframework。

GAE in development is quite easy to use, this is almost a memory DB so it's very light and practical. GAE在开发中非常易于使用,这几乎是一个内存数据库,因此非常轻巧实用。

Thus, if you want to mock Siena models, there are no specific classes for this. 因此,如果要模拟Siena模型,则没有特定的类。 But as it's using ActiveRecord pattern 但由于它使用的是ActiveRecord模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM