I'm fooling around with the XNA framework.
To help me around I made a helper class that looks like this:
ActorHolder
+ SpriteBatch (SpriteBatch)
+ ContentManager (ContentManager)
- drawables (IList<IDrawable>)
- updatables (IList<IUpdatable>)
+ ActorHolder(GraphicsDevice, ContentManager)
+ Draw(GameTime)
+ Update(GameTime)
+ AddActor(IActor)
+ RemoveActor(IActor)
+ GetCollidingActors(IActor)
Now I want to unit test this class. But as you see my constructor needs a graphics device and a contentmanager. While I think this makes sence in my application, it doesn't in my tests.
Should I mock these two just in order to unit test or is my design flawed?
--UPDATE--
I found a link to a project that might help out: http://scurvytest.codeplex.com/
Don't have any xp with it yet as coding has to make room for social life a bit.
--Note--
Excuse me my UML French, my company doesn't use it so I never used it except back at school.