You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by hammett <ho...@cimcorp.com.br> on 2003/07/29 23:51:04 UTC

CSFramework

I downloaded the code and found a few things:


File LifecycleDelegates.cs:

/* What about this? There are no declared exceptions. */

delegate void Execute();

/* Do we really need these? */



hammett: Nope. You don't need them. A delegate defines a signature. Why
create "identical" delegates? Except if you guys plan change these
signatures at any time and minimize the impacts.



delegate void Start();

delegate void Stop();

/* How do we pair these? And do we really need them? */

delegate void Suspend();

delegate void Resume();



hammett: The same.



delegate void Resolve( IContext context );

delegate void SetLogger( ILogger logger );

delegate void Contextualize( IContext context );

delegate void Configure( IConfiguration config );

delegate void Parameterize( Parameters parameters );

delegate void Service( IServiceManager manager );



hammett: Here things should be refactored (same reason).



delegate void Initialize();

delegate void Dispose();



hammett: As have been said Dispose exists in the .net framework as
IDisposable and works like a pattern (often also exposed with a Close
method). Should be enough, I think.



I don't know how much valuable is these kind of tests:

[Test] public void Constructor()

{

Assertion.AssertNotNull( new ServiceException() );

Assertion.AssertNotNull( new ServiceException( "message" ) );

Assertion.AssertNotNull( new ServiceException( "message", new
Exception() ) );

}



Or how deep should a test reach like:



context.MakeReadOnly();

Assertion.Assert( context.IsReadOnly );

try

{

context["test"] = "foo";

}

catch(ContextException ce)

{

Assertion.AssertEquals("Context is read only and can not be modified",
ce.Message);

}



Maybe a new type of Exception should be created at this time and it should
be tested. Not the error message.

>From here I can see a lot of work to do. With the XP practice in mind
"deliver the simple amount of code that could possibly work" I suggest
target in small pieces and deliver it in one or two weeks. Is it a good
strategy?



Regards,

hammett
MCAD
Meet Polyethylene at http://polyethy.sourceforge.net/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org