public async Task GetScanStatus() { var expected = new ScanStatus(); var actual = await NetverifyClient.GetScanStatusAsync(_scanReference); expected.Status = ScanStatusStatus.DONE; expected.ScanReference = _scanReference; DeepAssert.Equal(expected, actual, "Timestamp"); // Сравни все поля кроме Timestamp Assert.IsType <ScanStatus>(actual); }
public async Task SubmitFlow() { var scanReference = await UploadDocument(); var scanStatus = new ScanStatus { Status = ScanStatusStatus.PENDING }; var i = 0; while (scanStatus.Status == ScanStatusStatus.PENDING && i < 20) { await Task.Delay(TimeSpan.FromSeconds(10)); scanStatus = await NetverifyClient.GetScanStatusAsync(scanReference); i++; } Assert.Equal(ScanStatusStatus.DONE, scanStatus.Status); var scanData = await NetverifyClient.GetScanDataAsync(scanStatus.ScanReference); DeepAssert.Equal(Defaults.DriverGbr, scanData, "Timestamp", "ScanReference", "Date"); }