minhphien / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

Some unit tests are calling other unit tests #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi...i think the unit tests must be reviewed, there are some unit tests 
calling other unit tests so if one fails the other fails, as opposed of 
the "unit test" meaning...
For example TransformationProviderBase.AddTable() test is called from a 
lot of derived tests...so if someone writes a wrong assert there will 
cause something like 100+ tests to fail

For a non member this tool is giving only the option to set summary and 
description, so every one reporting here will be reporting a defect with 
medium priority...is there to the administrators an option to open this 
properties to everyone?

Original issue reported on code.google.com by gustavo.ringel@gmail.com on 13 Jun 2008 at 1:33

GoogleCodeExporter commented 9 years ago
We might want to refactor those into non-test helper methods. I don't feel too
strongly either way. 

I guess AddTable is a pretty fundamental operation though - if that fails the 
tests
that depend on the database structure being correct for their own test cases 
aren't
going to work either right?

Original comment by geoffl...@gmail.com on 13 Jun 2008 at 1:58

GoogleCodeExporter commented 9 years ago
I agree with the refactor. For sure if we break _provider.AddTable we will 
break 
hundreds of unit tests depending on it, but if we put a wrong assert in the 
AddTable 
test it will break only that test...

Original comment by gustavo.ringel@gmail.com on 13 Jun 2008 at 2:05

GoogleCodeExporter commented 9 years ago
SVN 98
Refactored out those reused methods so they are not test methods, but rather 
just
shared by the tests.
A couple of other small refactorings as well.

Original comment by geoffl...@gmail.com on 19 Jun 2008 at 2:56