public void GetAllTest() { try { Test(); var artPieceCtr = new ArtPieceDb(_mockContext.Object); var list = artPieceCtr.GetAll(); Assert.AreNotEqual(0, list.Count); } catch (Exception e) { Console.WriteLine(e); Assert.Fail(); } }
public void UpdateTest() { try { Test(); var artPieceCtr = new ArtPieceDb(_mockContext.Object); _artPiece.Artist = "Søren"; artPieceCtr.Update(_artPiece); var list = artPieceCtr.GetAll(); Assert.AreEqual("Søren", list[0].Artist); } catch (Exception e) { Console.WriteLine(e); Assert.Fail(); } }