public async Task TestAddPartnerAsync() { var testUser = new ApplicationUser(); _mockUserManager.Setup(x => x.GetUserAsync(It.IsAny <ClaimsPrincipal>())).ReturnsAsync(testUser); var testPartner = new Partner() { Id = new Guid("00000000-0000-0000-0000-000000000001"), PlayerId = new Guid("00000000-0000-0000-0002-000000000000"), PartnerId = new Guid("00000000-0000-0003-0000-000000000000"), }; _mockPlayerAccessLayer.Setup(x => x.GetPlayerByUserId(It.IsAny <Guid>())). Returns(new Player() { Id = new Guid("00000000-0000-0000-0002-000000000000"), UserId = new Guid("00000000-0000-0000-0002-000000000000"), FirstName = "Michael", LastName = "Nelmes", Handicap = new Decimal(24.8), Created = _createdAt, Modified = _modifiedAt }); _mockPartnerAccessLayer.Setup(x => x.AddPartner(testPartner)). ReturnsAsync(true); var expected = new Guid("00000000-0000-0000-0000-000000000002"); var actual = await _sut.AddPartnerAsync(testPartner) as ObjectResult; actual.StatusCode.Should().Be(200); }