public void SetUp() { _moqer = new AutoMoqer(); _model = new AccountEstimationModel { Id = Guid.NewGuid().ToString("N"), Apprenticeships = new List <VirtualApprenticeship>(), EmployerAccountId = 12345, EstimationName = "default" }; _moqer.SetInstance(_model); _moqer.GetMock <IVirtualApprenticeshipValidator>() .Setup(x => x.Validate(It.IsAny <VirtualApprenticeship>())) .Returns(new List <ValidationResult>()); _moqer.GetMock <IAccountEstimationRepository>() .Setup(x => x.Get(It.IsAny <long>())) .Returns(Task.FromResult(_moqer.Resolve <AccountEstimation>())); _moqer.GetMock <IDateTimeService>() .Setup(x => x.GetCurrentDateTime()) .Returns(new DateTimeService().GetCurrentDateTime()); }
public void Setup(AutoMoqer autoMoqer, Config config, Mocking mocking) { AddTheAutoMockingContainerExtensionToTheContainer(autoMoqer, config, mocking); RegisterInstance(this); }