I've just started writing unit tests and I'm not sure am I doing it the "right way." Should I test every class "by removing dependencies"? In other words, does unit testing mean: "test part of a code with assumption that provided dependencies to other modules are correct and test these dependencies as single modules later in other unit test classes"?
For example, I write WinRT application in Model-View-ViewModel manner and I have MainViewModel class. This class has dependency to IDataRepository which is injected in constructor. MainViewModel is responsible for handling commands and connecting model with view. MainViewModel has commands like CopyItems, LoadData etc which are relying on IDataRepository implementation.
Should I pass fake (mock/fake it??) IDataRepository in MainViewModel_Tests and test just is data loaded, copied etc. on command execution? Should one test check just things what class really do - not what dependencies do?