protected override void When()
        {
            _auditRecordDto = new AuditRecordDto
            {
                ReportId      = CreatedReport.Id,
                ReportingData = "Trump Dossier",
                UpdatedBy     = "Sergey & Oleg",
                UpdatedUtc    = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow)
            };

            SUT.SaveAuditRecord(_auditRecordDto);
        }
Beispiel #2
0
        protected override void Given()
        {
            base.Given();
            UpdatedReport = new ReportDto
            {
                Id                  = CreatedReport.Id,
                EmployerId          = CreatedReport.EmployerId,
                ReportingPeriod     = CreatedReport.ReportingPeriod,
                Submitted           = CreatedReport.Submitted,
                UpdatedUtc          = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow.AddSeconds(-5)),
                AuditWindowStartUtc = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow.AddSeconds(-10)),
                ReportingData       = "Wikileaks",
                UpdatedBy           = "Igor"
            };

            SUT.Update(UpdatedReport);
        }
Beispiel #3
0
        protected override void When()
        {
            _reportCreatedViaRepository = new ReportDto
            {
                Id                  = RepositoryTestHelper.ReportOneId,
                EmployerId          = "Uncle Sam",
                ReportingData       = "Some genious piece of json",
                ReportingPeriod     = "1111",
                Submitted           = false,
                AuditWindowStartUtc = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow),
                UpdatedUtc          = RepositoryTestHelper.TrimDateTime(DateTime.UtcNow),
                UpdatedBy           = "{ FullName: 'Bob Shurunkle'}"
            };

            SUT
            .Create(
                _reportCreatedViaRepository);
        }
Beispiel #4
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);
        }