﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Design for testable</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 22:43:32 GMT</lastBuildDate><ttl>20</ttl><item><title>Design for testable</title><link>http://forum.strataframe.net/FindPost22609.aspx</link><description>Hi,&lt;br&gt;
I am using application framework to develop application. The framework come with BusinessObject base class. Developer will always inherit from it to create any other business object.&lt;br&gt;
&lt;br&gt;
I have question that, for some method, I am not designed to allow overriable. It has restricted me from unit test, whereby, sometime I need to have "mock" business object so that I don't have to have connection to database. I can just "simulate" the result at the BO.Method(). Since my method is not designed for overriable, it has limited me to do what I need. Most importantly, I need to utilize some of the BO base class function as well.&lt;br&gt;
&lt;br&gt;
Now, I am using conditional compilation to achieve this. I would like to know if any better way. I found I can might able to use delegate, but I am not so sure about it. Any advice?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Mon, 06 Apr 2009 08:04:06 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: Design for testable</title><link>http://forum.strataframe.net/FindPost22654.aspx</link><description>I will add all of these to the list.&amp;nbsp; Most of these should be overridable anyway, so I will start going back and adding these.&amp;nbsp; Thanks.</description><pubDate>Mon, 06 Apr 2009 08:04:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Design for testable</title><link>http://forum.strataframe.net/FindPost22648.aspx</link><description>Hi,&lt;br&gt;
Most of the time, I would like to override those method that fill data such as BO.FillByXXXX() because I don't want to to reply on database while testing on logic. Instead, I prefer to override BO.FillByXXXX() and "simulate" the return data based for each scenario.&lt;br&gt;
&lt;br&gt;
Of course, BO.FillByXXXX() by right is not designed to be override in application.&lt;br&gt;
&lt;br&gt;
Please advice, Thank you</description><pubDate>Sat, 04 Apr 2009 22:25:03 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: Design for testable</title><link>http://forum.strataframe.net/FindPost22642.aspx</link><description>What properties and methods would you like to be able to overwrite?</description><pubDate>Sat, 04 Apr 2009 13:05:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>