public void WhenUserProfileIsAvailableThenReturnOk()
        {
            var actual = _target.Get();

            (actual.Result as StatusCodeResult)?
            .StatusCode.Should()
            .Be((int)HttpStatusCode.OK);
        }
Beispiel #2
0
        public void GetUser_should_return_user()
        {
            // Arrange
            var user = new User("Johan Sugiarto", "94cd0001-3e70-44d3-a1d1-ad62ba9f5ff2");

            _userService.GetUser().Returns(user);

            // Act
            var result = _answersController.Get();

            // Assert
            result.Should().NotBeNull();

            var content = result.Value;

            content.Should().BeEquivalentTo(user);
        }