Last post Jul 23, 2014 02:08 AM by Mikesdotnetting
Jul 23, 2014 12:22 AM|dotnetterAMG123|LINK
Jul 23, 2014 02:08 AM|Mikesdotnetting|LINK
You should have an IUserDal which specifies a CreateUser method. Then you can develop both a UserDal and a FakeUserDal that implement that interface. The UserDal (which communicates with the database) is injected at runtime and the FakeUserDal (which fulfills
the interface contract by returning mocked up objects) is injected at test time. It stops the unit test having to make an actual call to a database which can slows tests down.