Exemple #1
0
        public void TryAddPostamatTest()
        {
            var repository = GetPostamatRepository();

            var postamat = new Postamat
            {
                Address   = "Lenina 10",
                IsWorking = true
            };

            Assert.Throws <Exception>(() => repository.Add(postamat));
        }
Exemple #2
0
        private List <Postamat> GeneratePostamats()
        {
            var postamats = new List <Postamat>();

            for (var i = 0; i < 10; i++)
            {
                var postamat = new Postamat
                {
                    Id        = i,
                    Address   = $"Baker street 2{i}",
                    IsWorking = i % 3 != 0
                };

                postamats.Add(postamat);
            }

            return(postamats);
        }
Exemple #3
0
 /// <inheritdoc />
 public Task <Postamat> UpdateAsync(Postamat updatedPostamat, CancellationToken token)
 {
     return(Task.FromResult(Update(updatedPostamat)));
 }
Exemple #4
0
 /// <inheritdoc />
 public Task <Postamat> AddAsync(Postamat newPostamat, CancellationToken token)
 {
     return(Task.FromResult(Add(newPostamat)));
 }
Exemple #5
0
 /// <inheritdoc />
 public Postamat Update(Postamat updatedPostamat)
 {
     throw new Exception();
 }
Exemple #6
0
 /// <inheritdoc />
 public Postamat Add(Postamat newPostamat)
 {
     throw new Exception();
 }