Data Layer Testing: Test Inheritance Patterns

My blog has moved. You can view this post at the following address: http://www.osherove.com/blog/2007/11/28/data-layer-testing-test-inheritance-patterns.html
Published Wednesday, November 28, 2007 8:56 PM by RoyOsherove

Comments

Thursday, November 29, 2007 9:10 AM by The Daily Find #7 - TechToolBlog

# The Daily Find #7 - TechToolBlog

Pingback from  The Daily Find #7 - TechToolBlog

Wednesday, December 19, 2007 11:32 AM by Jason

# re: Data Layer Testing: Test Inheritance Patterns

I have a question about the second and third patterns. Should I test delete for example if currently my application doesn't need to delete the entity?

Wednesday, December 19, 2007 9:05 PM by Elegant Code » But the tests passed on my machine…

# Elegant Code » But the tests passed on my machine…

Pingback from  Elegant Code » But the tests passed on my machine…

Thursday, December 20, 2007 9:37 AM by Jason

# re: Data Layer Testing: Test Inheritance Patterns

Yes, I am rolling everything back using what you call an "Abstract Utility Class". Our data layer uses the common approach of passing a generic type to provide CRUD functionality "for free" for a given entity. My question is really about YAGNI - should I write a test for functionality that I don't currently need?

Thursday, December 20, 2007 10:25 AM by RoyOsherove

# re: Data Layer Testing: Test Inheritance Patterns

Jason:

either you derive and implement the abstract method with nothing in the body, or create a separate utility class for your scenarios..