public void ThenGenereerEenFactuurnummer()
        {
            var dataMapper = new BestellingDataMapper(_context);
            var result     = dataMapper.GetById(1);

            Assert.AreEqual(1, result.Factuurnummer);
            Assert.AreEqual(2, result.BestelRegels.Count);
            Assert.AreEqual(_klantnummer, result.Klantnummer);
            Assert.AreEqual(DateTime.Now.Date, result.Besteldatum.Date);
        }
コード例 #2
0
        public void GetById_Should_ReturnBevestigdeBestellingWithCertainId_When_Id_IsGiven()
        {
            // Arrange
            BevestigdeBestelling bevestigdeBestelling = new BevestigdeBestellingBuilder().SetDummy().Create();

            _context.BevestigdeBestellingen.Add(bevestigdeBestelling);
            _context.SaveChanges();

            // Act
            BevestigdeBestelling result = _target.GetById(bevestigdeBestelling.Id);

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(bevestigdeBestelling.IsEqual(result));
        }
コード例 #3
0
 public void NotImplementedMethods_ShouldThrowNotImplementedException()
 {
     Assert.ThrowsException <NotImplementedException>(() => _target.GetById(1));
     Assert.ThrowsException <NotImplementedException>(() => _target.Delete(new Bestelling()));
     Assert.ThrowsException <NotImplementedException>(() => _target.Update(new Bestelling()));
 }