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); }
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)); }
public void NotImplementedMethods_ShouldThrowNotImplementedException() { Assert.ThrowsException <NotImplementedException>(() => _target.GetById(1)); Assert.ThrowsException <NotImplementedException>(() => _target.Delete(new Bestelling())); Assert.ThrowsException <NotImplementedException>(() => _target.Update(new Bestelling())); }