Example of TDD to-do list
Developing a Processing Factory
-
Query "Oscillator" to the factory and the returned Processing* type_id ==
Oscillator
-
Processing* p = CreateOscillator(); type_id of p is Oscillator
-
Registry :
-
Get a creator method when registry is empty
-
Unsafe version with CLAM_ASSERT
-
Safe version rises Err
-
Having added a single creator method, ask for the correct key
-
Having added a single creator method, ask for the wrong key
-
Having added two elements, ask for one of the keys
-
Having added two elements, ask for an incorrect key
-
Add a repeated key
-
Unsafe version: CLAM_ASSERT
-
Safe version: rises ErrFactory
-
Automatic registry
-
FactoryRegistrator< Dummy > Create() returns a Dummy;
-
create a Oscillator after having constructed the FactoryRegistrator with
factory. (two versions: passing explicitly the key, and using GetClassName)
-
The same after FactoryRegistrator without an explcit factory (so using
singleton)
-
Make Registrator inner class of Factory
-
AddCreator should return bool ? No. do it evident
-
separate FactoryRegistry tests. Thus simplifying the names
-
RemoveAllCreators (since Factory is singleton and we want to tear tests down)
-
when empty, when non empty
-
Count when empty and non empty.
-
Make Registry a Factory inner class
-
Avoid #include bottleneck in Factory
-
Create custom assert for typeid
-
ProcessingFactory singleton
-
Arrange documentation
-
Split into hxx and cxx
-
Make Factory::GetRegistry private.
-
Pass RegistryKey (string) params by ref.
-
ProcessingFactory::MakeProcessingSafe with a bad key
-
Speciallise Factory errors
-
decide -Safe or -Safely
-
Processsings with static GetClassName
-
Generic Factory (Templates)
-
Use typedefs instead of Processing dependent types
-
Use typedefs in tests wherever possible
-
Jump Factory code to Templatized tests
-
Create dummy products hierarchy
-
Adapt FactoryRegistryTest to use DummyProducts
-
Adapt FactoryRegistratorTest to use DummyProducts
-
Adapt FactoryTest to use DummyProducts