Comments (5)
@Iprogrammerr Hi Igor! That's a good idea, but won't break this rule?
from cactoos-jdbc.
@fabriciofx the rule "Test Methods Must Share Nothing" is not 100% right, IMHO. You can share data/code among the tests, but you cannot do this in a specific order like "method A should run before B, then C".
Another thing is: if you share data among tests, you need to guarantee that the data should came back to its initial state before use it in another test.
from cactoos-jdbc.
@mdbs99 Thanks for sharing your knowledge with us! But when you're saying "method A should run before B, then C" and "if you share data among tests, you need to guarantee that the data should came back to its initial state before use it in another test." there isn't a conflict between them, because I should use setup() and teardown() methods to achieve it?
from cactoos-jdbc.
If there is not conflict (eg. the data is readonly, it's always in the same state), you don't need to use setup() and teardown().
from cactoos-jdbc.
@fabriciofx In this case table/tables with some records is precondition for testing classes from specific package(rset in this case). So this rule does not apply here. Moreover, we can make this class configurable so if will prepopulate databse with table that can be defined dynamically, so that our test will not depend on some specific table.
from cactoos-jdbc.
Related Issues (20)
- Implements Constraints to Agenda
- Let's update Copyright notice to 2019. HOT 1
- Automate build HOT 4
- Cached decorator (FakeConnection class in EO Vol 2)
- Configure pdd and 0pdd
- ANTLR warning HOT 1
- Employ docker-composer to create DB containers
- Improve Script and ScriptSql design HOT 1
- Create a ScriptSqlEmpty that represents an empty sql script HOT 1
- Refactor Params to improve architectural design HOT 1
- Rename Param value attribute to be different of parameter value name HOT 1
- Server extends Closeable instead of AutoCloseable HOT 1
- Use openjdk8 instead of oraclejdk8 in Travis CI HOT 1
- Update dependencies HOT 1
- Project doesn't compile
- Dependency Dashboard
- Release it to sonatype HOT 11
- Change List<Contact> to Contacts? HOT 3
- Retrieve the data as JSON HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cactoos-jdbc.