xunit

  1. B

    Resolved Issue can't mock

    Hello, I have issue with Xunit in .Net core testing. I can't make mocking of my method GetBudgetByUser() it returns 0. I have tried all possible solutions but never found solution and I sit in stuck. [Fact] public async Task GetBudgetsByUser_ReturnsBudgets_WhenBudgetsFound() { // Arrange...
  2. Samuel David

    How to write Unit test for DAL which call stored procedure and direct sql commands

    Hello Everyone, I am writing unit test cases(using xunit) for DAL methods(which are calling stored procedures and some direct sql commands and not returning methods). How can I mock the results coming from db in unit tests. public class Notification : Base, INotificationBal { public void...
  3. OmarBouattour

    Xunit integration testing for Post gives bad request

    Hello I'm learning integration testing and I want to test a 'POST' method from my controller using xunit and WebApplicationFactory But I'm getting this exception System.Net.Http.HttpRequestException : Response status code does not indicate success: 400 (Bad Request). This is my Test: using...
Back
Top Bottom