コード例 #1
0
        public void GetOneMember_WithValidId_IsNotNull()
        {
            // Arrange
            var id = _fixture.Create <int>();

            var oneMember = _fixture.Build <TeamMemberData>().With(x => x.PersonId, id).Create();

            _teamDatabase.GetOneMember(id).Returns(oneMember);

            var person = _fixture.Create <Person>();

            _personService.GetOnePerson(Arg.Any <int>()).Returns(person);

            _channelFactoryWrapper.GetPersonService().Returns(_personService);

            // Act
            var actual = _sut.GetOneMember(id);

            // Assert
            actual.Should().NotBeNull();
        }
コード例 #2
0
 private Person GetPerson(TeamMemberData memberData)
 {
     return(_channelFactoryWrapper.GetPersonService().GetOnePerson(memberData.PersonId));
 }