public async Task Create_Multiples_Concursos() { await _sut.Crear(_newConcurso, proveedors); await _sut.Crear(_newConcurso, proveedors); await _sut.Crear(_newConcurso, proveedors); (await _concursoRepository.Get()) .Success(x => { x.Count.Should().Be(3); }); }
public ConsistencyValidatorShould() { _sut = new ConsistencyValidator(); var concursoServices = new ConcursoServices(); _newConcurso = new Concurso(1234, "Test", new DateTime(2019, 2, 2), new DateTime(2019, 2, 4), false, "Descripion"); var proveedor = new Proveedor(); proveedors.Add(proveedor); var proveedoresRepository = new ProveedoresRepository(); proveedoresRepository.InsertDataAsync(proveedor).GetAwaiter().GetResult(); AsyncHelper.CallAsyncMethodVoid(() => concursoServices.Crear(_newConcurso, proveedors)); AsyncHelper.CallAsyncMethodVoid(() => concursoServices.Crear(_newConcurso, proveedors)); AsyncHelper.CallAsyncMethodVoid(() => concursoServices.Crear(_newConcurso, proveedors)); AsyncHelper.CallAsyncMethodVoid(() => concursoServices.Crear(_newConcurso, proveedors)); }