Untitled
unknown
plain_text
a year ago
970 B
6
Indexable
[Test] [TestCase("electronics")] [TestCase("pavan")] public async Task GetProductsInCategory(string name) { var options = new DbContextOptionsBuilder<TemplateContext>() .UseMySql(ConnectionStrings, new MySqlServerVersion(new Version(8, 0, 23))) .Options; using (var dbContext = new TemplateContext(options)) { var repo = new Repo(dbContext); var result = await repo.GetProductsInCategory(name); Console.WriteLine(result); switch (result) { case "enter a valid product in the inventory": case (result != null): Assert.Pass(); break; default: Assert.Fail(); break; } } }
Editor is loading...
Leave a Comment