Ejemplo n.º 1
0
        public void Update_ShouldThrowNotImplementedException()
        {
            // Arrange
            // Act
            Action act = () =>
            {
                _target.Update(null);
            };

            // Assert
            Assert.ThrowsException <NotImplementedException>(act);
        }
Ejemplo n.º 2
0
        public void Update_ShouldUpdateKlant()
        {
            // Arrange
            Klant klant      = new KlantBuilder().SetDummy().Create();
            var   dataMapper = new KlantDataMapper(_context);

            klant            = dataMapper.Insert(klant);
            klant.Achternaam = "Worst";

            // Act
            dataMapper.Update(klant);
            Klant result = dataMapper.Find(x => x.Achternaam == "Worst").FirstOrDefault();

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.IsEqual(klant));
            Assert.AreEqual("Worst", klant.Achternaam);
        }