public void Get_MatchFixtureByGuid() { var matchFixtureDto = new GetMatchFixtureRequest { Guid = Guid.NewGuid() }; var matchFixture = new MatchFixture() { Guid = matchFixtureDto.Guid }; var expectedMatchFixture = new MatchFixtureData(); _mapper.Expect(m => m.Map <GetMatchFixtureRequest, MatchFixture>(matchFixtureDto)).Return(matchFixture); _mapper.Expect(m => m.Map <MatchFixture, MatchFixtureData>(matchFixture)).Return(expectedMatchFixture); _matchFixtureService.Expect(s => s.Find(matchFixtureDto.Guid)).Return(matchFixture); var result = _controller.Get(matchFixtureDto); Assert.AreEqual(ResponseStatus.Success, result.Status); Assert.AreSame(expectedMatchFixture, result.MatchFixtureData); }
public void Delete_RemovingExistingMatchFixture() { var matchFixtureGuid = Guid.NewGuid(); _matchFixtureService.Expect(s => s.Delete(matchFixtureGuid)); var result = _controller.Delete(matchFixtureGuid); Assert.AreEqual(HttpStatusCode.NoContent, result.StatusCode); }