public void MapEntityToModel() { var mapper = new DALBucketMapper(); Bucket item = new Bucket(); item.SetProperties(1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A"); ApiBucketServerResponseModel response = mapper.MapEntityToModel(item); response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALBucketMapper(); Bucket item = new Bucket(); item.SetProperties(1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A"); List <ApiBucketServerResponseModel> response = mapper.MapEntityToModel(new List <Bucket>() { { item } }); response.Count.Should().Be(1); }