public async Task GetUser_UnknownIdPassed_ReturnsNotFoundResult() { // Arrange var controller = new ApplicationUsersController(flashcardDbContextMock.Object, logger, fakeUserManager.Object, GetMockSignInManager().Object, loginService); string unknownUserId = "2225049ed9e-7929-4fae-a693-6449097059a8"; // Act var result = await controller.GetUser(unknownUserId); // Asssert Assert.IsType <NotFoundResult>(result.Result); }
public async Task GetUser_ExistingIdPassed_ReturnsRightUser() { // Arrange var controller = new ApplicationUsersController(flashcardDbContextMock.Object, logger, fakeUserManager.Object, GetMockSignInManager().Object, loginService); string existingUserId = "5049ed9e-7929-4fae-a693-6449097059a8"; // Act var result = await controller.GetUser(existingUserId); // Asssert Assert.Equal("Teszt User", result.Value.Name); }