public void testFindAll() { repository.deleteAll(); repository.save(new Powder("a")); repository.save(new Powder("b")); List <Powder> res = repository.findAll(); Assert.AreEqual(2, res.Count); Assert.AreEqual("a", res[0].PowderName); Assert.AreEqual("b", res[1].PowderName); repository.deleteAll(); res = repository.findAll(); Assert.AreEqual(0, res.Count); }
public List <Powder> findPowders() { return(powderRepository.findAll()); }