public async void LoginAsync_EmailExist_GotMinus1() { var optionsBuilder = new DbContextOptionsBuilder <WeightWatchersContext>() .UseSqlServer("Server = C1; Database = WeightWatchersDB ;Trusted_Connection=True; ").Options; WeightWatchersContext weightWatchersContext = new WeightWatchersContext(optionsBuilder); var subscriberService = new SubscriberService(new SubscriberRepository(weightWatchersContext, mapper), mapper); //Act - Call the method being tested var isEmailExist = await subscriberService.LoginAsync("*****@*****.**", "4545"); //Assert Assert.Equal(isEmailExist, -1); }