I'm writing some unit tests for an ASP.NET MVC controller that's using SubSonic3 generated model objects (using ActiveRecord "mode" (not sure what else to call it), and am wondering how I can clear out the test data from the test database in my TestFixture's TearDown method. I don't have a direct reference to the model object in my test class, as its a model object that's created by a ControllerAction, so I can't seem to figure out how to clear out the data. Anyone have any ideas?
Asp – SubSonic3 clearing test data/database in unit test TearDown operation
asp.net-mvcnunitsubsonicsubsonic3
Related Topic
- C# – How to get the client’s IP address in ASP.NET MVC
- Asp.net-mvc – How to Unit Test JsonResult and Collections in MSTest
- Asp.net-mvc – ASP.NET Identity DbContext confusion
- C++ – Why can’t I initialize the static data member in the constructor
- C# – How to unit test an ASP.NET Core controller or model object
Best Answer
Sorry...I figured it out.
MyModelClass.ResetTestRepo()
did it for me.