Esempio n. 1
0
        public void UpdateBand_WhenAlways_ShouldCallRepository()
        {
            // Arrange
            string id = "akjsdh1u23917y189hj";

            Core.Models.Band bandCore = new Core.Models.Band()
            {
                Id = id
            };

            Infrastructure.Models.Band bandInfra = new Infrastructure.Models.Band()
            {
                Id = id
            };

            _mapper.Setup(x => x.Map <Infrastructure.Models.Band>(bandCore)).Returns(bandInfra);
            _bandsApiDataAdapter.Setup(x => x.UpdateBand(id, bandInfra));

            // Act
            _sut.UpdateBand(id, bandCore);

            // Assert
            _bandsApiDataAdapter.Verify(x => x.UpdateBand(id, bandInfra));
        }
Esempio n. 2
0
 public async Task Put(string id, [FromBody]  Models.Band band)
 {
     Core.Models.Band mappedBand = _mapper.Map <Core.Models.Band>(band);
     await _bandsService.UpdateBand(id, mappedBand);
 }