TOP
PROFILE
MUSIC TUNE
BBS
LINK

2004年11月18日

Enterprise Library と ユニットテスト

最近は11時15分くらいが平均退社時間になってる状況でちとしんどい・・でも眠い目をこすりながらEntLibの英語ドキュメントを一読・・んで「Unit Testing」の項によると、

Each application block includes its unit tests within its assembly. The unit tests are contained in their own folders within each project. These folders are always named Tests.・Unit tests are named by appending .Tests to the namespace of the functionality being tested. For example the unit test for the Caching Application Block is named Microsoft.Practices.EnterpriseLibrary.Caching.Tests.

All unit tests are contained within the compiler directive #if UNIT_TESTS. This allows the library to be built even if the unit tests are a part of the assembly.

Enterprise Library tests are run using NUnit, a .NET testing framework. NUnit uses the attribute feature of .NET to identify tests. Test fixtures are identified by the attribute [TestFixture] and individual tests by [Test].

とあり、どうやらEntLib自体がTDDで開発され、そのテスト用のプロジェクトソースもまんま公開されるんだろうと思います。(たぶん)
これは非常に有り難いですね、まずテストコードを学ぶ上で良いサンプルになるのと、もしEntLibを改変、拡張する場合に再帰でテストをすることも可能ですし♪

ほんと色々な魅力に溢れたソースワールドが展開されそうです(^^)

Posted by GAMMARAY at 2004年11月18日 00:25 | TrackBack
Comments
Post a comment









Remember personal info?