コード例 #1
0
        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");
        }
コード例 #2
0
        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);
        }