コード例 #1
0
        protected override void Given()
        {
            RepositoryTestHelper.ClearData();

            SUT = new SQLReportRepository(RepositoryTestHelper.ConnectionString);

            CreatedReport = new ReportDto
            {
                Id                  = RepositoryTestHelper.ReportOneId,
                EmployerId          = "Uncle Bob",
                ReportingData       = "Original created data",
                ReportingPeriod     = "2222",
                Submitted           = true,
                AuditWindowStartUtc = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow.AddMinutes(-1)),
                UpdatedUtc          = RepositoryTestHelper.TrimDateTime(DateTime.Now.AddSeconds(-30)),
                UpdatedBy           = $"{{ Id: '{Guid.NewGuid()}', Name: 'Name'}}"
            };

            SUT.Create(CreatedReport);
        }
コード例 #2
0
        protected override void Given()
        {
            RepositoryTestHelper
            .ClearData();

            SUT = new SQLReportRepository(RepositoryTestHelper.ConnectionString);

            SubmittedReport = new ReportDto
            {
                Id              = RepositoryTestHelper.ReportOneId,
                EmployerId      = EmployerId,
                ReportingData   = "Some dumb piece of json",
                ReportingPeriod = "2222",
                Submitted       = true
            };

            SUT
            .Create(
                SubmittedReport);
        }
        public void GivenAReportHasBeenCreated()
        {
            _reportDto.UpdatedBy = ScenarioContext.Current.Get <TestUser>(ContextKeys.CurrentUser).ToJson();

            _reportRepository.Create(_reportDto);
        }