/// <summary> /// Initializes a new instance of the <see cref="TestableBase{T}"/> class. /// </summary> public TestableBase() { this.AutoMocker = AutoMock.GetLoose(); }
public void SetUp() { mocker = AutoMock.GetLoose(); }
public void ProperInitializationIsPerformed() { AssertProperties(AutoMock.GetLoose()); AssertProperties(AutoMock.GetStrict()); }
private AutoMock GetMock() => AutoMock.GetLoose();
public void TestInitialize() { _mock = AutoMock.GetLoose(); _mock.Create <CompanyRegisterRequestToUserConverter>(); }
public FilmManagementServiceTests() { _autoMockContext = AutoMock.GetLoose(); }
public void ExceptionMiddleWareSetup() { _mocker = AutoMock.GetLoose(); _sut = _mocker.Create <LoggingDataExtractor>(); }
public void ClassSetUp() { _mock = AutoMock.GetLoose(); }
public void SetUp() { Container = AutoMock.GetLoose(cfg => OnSetup(cfg)); //OnSetup(); }
public ScreeningManagementServiceTests() { _autoMockContext = AutoMock.GetLoose(); }
[SetUp] public void Setup() { _mock = AutoMock.GetLoose(); }
public SystemUnderTestFixture() { _mock = AutoMock.GetLoose(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _mock.Create <CompanyRegisterController>(); }
public TestClass() { Automock = AutoMock.GetLoose(); }
/// <summary> /// Initializes a new instance of the <see cref="TestAutoMockBase" /> class. /// </summary> public TestAutoMockBase() { AutoMock = AutoMock.GetLoose(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _service = _mock.Create <CompanyRegisterEmailNotificationService>(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _controller = _mock.Create <InvitationController>(); }
public async Task WhenCallingGetYearToDatePayments_WithMultipleProviders_TheYtdPaymentsAreCorrect() { var mocker = AutoMock.GetLoose(); var payments = new List <PaymentModel> { new PaymentModel { Ukprn = 1, CollectionPeriod = CollectionPeriodFactory.CreateFromAcademicYearAndPeriod(2021, 1), ContractType = ContractType.Act1, Amount = 1000, }, new PaymentModel { Ukprn = 1, CollectionPeriod = CollectionPeriodFactory.CreateFromAcademicYearAndPeriod(2021, 1), ContractType = ContractType.Act2, Amount = 2000, }, new PaymentModel { Ukprn = 2, CollectionPeriod = CollectionPeriodFactory.CreateFromAcademicYearAndPeriod(2021, 1), ContractType = ContractType.Act1, Amount = 10000, }, new PaymentModel { Ukprn = 2, CollectionPeriod = CollectionPeriodFactory.CreateFromAcademicYearAndPeriod(2021, 1), ContractType = ContractType.Act2, Amount = 20000, }, }; using (var context = new InMemoryMetricsQueryDataContext()) { var factory = mocker.Mock <IMetricsQueryDataContextFactory>(); factory.Setup(x => x.Create()) .Returns(context); var sut = mocker.Create <PeriodEndMetricsRepository>(); foreach (var payment in payments) { await context.AddAsync(payment); } await context.SaveChangesAsync(); var actual = await sut.GetYearToDatePayments(2021, 2, CancellationToken.None); actual.Where(x => x.Ukprn == 1).Should().HaveCount(1); actual.Where(x => x.Ukprn == 2).Should().HaveCount(1); actual.Where(x => x.Ukprn == 3).Should().BeEmpty(); actual.Single(x => x.Ukprn == 1).Total.Should().Be(3000); actual.Single(x => x.Ukprn == 2).Total.Should().Be(30000); } }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _provider = _mock.Create <EmployeeProvider>(); }
public TodoCreateRequestValidatorTests() { var mock = AutoMock.GetLoose(); _validator = mock.Create <TodoCreateRequestValidator>(); }
public BaselUnitTest() { var localAutoMock = AutoMock.GetLoose(); App.SetContainer(localAutoMock.Container); MockPlatformServices.Init(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _service = _mock.Create <SetPasswordEmailService>(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _controller = _mock.Create <EmployeesController>(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); _mock.Create <CompanyNameTakenController>(); }
public void GivenAValidCooldownRegistry() { _container = AutoMock.GetLoose(); _registry = _container.Create <CooldownRegistry>(); }
public void TestInitialize() { _mock = AutoMock.GetLoose(); }
public void Setup() { _mocker = AutoMock.GetLoose(); }