public HeroApplicationTests() { _hero = new Hero {Id= new ObjectId(_id)}; _heroRepo.Setup(x => x.Get(_id)).Returns(_hero); _heroRepo.Setup(x => x.Get()).Returns(new List<Hero>{_hero}); _application = new HeroApplication(_heroRepo.Object); }
public void Update(Hero hero) { HeroCollection.ReplaceOne(GetIdFilter(hero.Id),hero); }
public void Add(Hero hero) { HeroCollection.InsertOne(hero); }