A simple case of layer-3 architecture decoupling and unit test business domains --- constructor assignment traditional nunit test examples bad taste? --- Refactoring proposal mspec introduction --- AAA syntax rhino mock --- I play my automock --- the highest level of laziness
Handy weapon Library:
Nunit
Mspec
Rhino mock
Automocking
For the tools involved in this article, see the previous art
view the console.
Running tests
First, install dependencies:
$ bundle install
Rubyspec related repos must be cloned as a gitsubmodules:
$ git submodule update --init
The test suite can be run using (requires PHANTOMJS):
$ rake
This would command would run all RSpec and mspec examples in sequence.
Automated runs
A with Guardfile decent mappings between specs and lib/corelib/stdlib files are in place. Run to has bundle exec guard -i
also like Resharper very much. The developers who work in JetBrains are miraculous people. Without ReSharper and some related tools, I might not be so fond of C #. BDD and MspecI also like the BDD-style framework called Machine spec (MSPEC). It's an amazing test framework that really supports testing itself with the right language in the test. Before I used Mspec, my test was a mess and it was very much i
developers who work in JetBrains are miraculous people. Without resharper and some related tools, I might not be so fond of C #.BDD and MspecI also like the BDD-style framework called Machine spec (MSPEC). It's an amazing test framework that really supports testing itself with the right language in the test. Before I used Mspec, my test was a mess and it was very much in my business.In addition,
developers who work in JetBrains are miraculous people. Without resharper and some related tools, I might not be so fond of C #.BDD and MspecI also like the BDD-style framework called Machine spec (MSPEC). It's an amazing test framework that really supports testing itself with the right language in the test. Before I used Mspec, my test was a mess and it was very much in my business.In addition,
appropriate; The implementation of validation is not suitable ......Yes, Senior agile practitioners like me still have this impulse in the first place, and too many ideas will be implemented immediately. This is actually a kind of human nature. It doesn't matter. I just let the bullet of thinking fly for a while.The first thing I think of is the completion test. Speaking of testing, I have used mspec for many times to get started with
concepts of testing. Mspec from the perspective of BDD, encapsulated a bit of nunit, can also be said to reconstruct the syntax, so that the test can be readable, provide a good test organization structure, and then can be tested, directly generate a perfect test results document. Rhino Mock is also a regular, but there are new in the old, the new version also added some commendable new performance, such as the so-called AAA syntax (Arrange, Action,
library, it is a powerful tool for architecture design. From an architectural standpoint, it isolates the business domain from the data layer, making it possible to design the data model and the business domain model independently. The impact of this is very far-reaching.NUnit + machine Specification + Rhino Mock + automocking---unit test prerequisitesAlas, No. On a weapon, I immediately introduced two, this time white send four. This also embodies the guiding ideology of my writing this articl
perspective of architecture, it isolates the business domain from the data layer, making it possible to independently design the data model and business domain model. This has a profound impact.NUnit + Machine Specification + Rhino Mock + AutoMocking --- essential for unit testing
Ah, no. When I used the last weapon, I suddenly introduced them. This time I sent four white packets. This also reflects the guiding ideology of writing this article, which is described from the perspective of develop
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.