摘要: 1.Moq中Mock Repository时最好是Mock Repository的接口,这样会避免不知名的错误。var mockClubRepository = new Mock<IClubRepository>();mockClubRepository.Setup(mr => mr.GetById(It.IsAny<Guid>()))2.Moq 中怎样返回空(How to return null in Moq):mockRepository.Setup(mr => mr.GetItems()).Returns(() => null);这种写法很常用, 阅读全文
posted @ 2013-01-21 11:43 Mr.Young 阅读(2443) 评论(0) 推荐(0) 编辑