public void GetWitcher() { Mock <IRepository <Witcher> > mock4 = new Mock <IRepository <Witcher> >(MockBehavior.Loose); Witcher w2 = new Witcher { Name = "John", Age = 99, AvaragePay = 120, School = "School of the Bear" }; string randomid = "random1234"; mock4.Setup(x => x.Read(randomid)).Returns(w2); WitcherLogic wl = new WitcherLogic(mock4.Object); //--- Witcher w3 = wl.Read(randomid); Assert.That(w3, Is.EqualTo(w2)); }
public IActionResult UpdateWitcher(string id) { return(View(WitcherLogic.Read(id))); }
public Witcher GetWitcher(string uid) { return(logic.Read(uid)); }