コード例 #1
0
        public void Setup()
        {
            LogHelper.ConfigureConsoleLogger();

            StaticStartup.Startup();

            _newId            = Guid.NewGuid();
            _tenantId         = Guid.NewGuid();
            _testService      = Substitute.For <ITestService>();
            _tenantIdProvider = Substitute.For <ITenantIdProvider>();
            _tenantIdProvider.GetTenantId().Returns(_tenantId);
        }
コード例 #2
0
        public void Setup()
        {
            LogHelper.ConfigureConsoleLogger();

            StaticStartup.Startup();

            _newId               = Guid.NewGuid();
            _tenantId            = Guid.NewGuid();
            _branchOfficeService = Substitute.For <IService <BranchOffice> >();
            _tenantIdProvider    = Substitute.For <ITenantIdProvider>();
            _logger              = Substitute.For <ILogger <BranchOfficeController> >();
            _timeService         = Substitute.For <ITimeService>();

            _credentialsService = Substitute.For <IWorkplaceCredentialsService>();
            _tenantIdProvider.GetTenantId().Returns(_tenantId);
            _timeService.CheckTimeZoneId(Arg.Any <string>()).Returns(true);
        }
コード例 #3
0
        public void Setup()
        {
            LogHelper.ConfigureConsoleLogger();

            StaticStartup.Startup();

            _newId             = Guid.NewGuid();
            _tenantId          = Guid.NewGuid();
            _inspectionService = Substitute.For <IInspectionService>();
            _inspectionService.When(s => s.BeginInspectionAsync(Arg.Any <Inspection>()))
            .Do(v => ((Inspection)v[0]).Id = _newId);
            _inspectionService.BeginInspectionAsync(Arg.Any <Inspection>()).ReturnsForAnyArgs(_newId);
            _tenantIdProvider = Substitute.For <ITenantIdProvider>();
            _tenantIdProvider.GetTenantId().Returns(_tenantId);

            _incompleteInspection = new Inspection()
            {
            };
        }
コード例 #4
0
        public void Setup()
        {
            LogHelper.ConfigureConsoleLogger();

            StaticStartup.Startup();
        }