예제 #1
0
        public void MapEntityToModel()
        {
            var      mapper = new DALFileTypeMapper();
            FileType item   = new FileType();

            item.SetProperties(1, "A");
            ApiFileTypeServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
예제 #2
0
        public void MapEntityToModelList()
        {
            var      mapper = new DALFileTypeMapper();
            FileType item   = new FileType();

            item.SetProperties(1, "A");
            List <ApiFileTypeServerResponseModel> response = mapper.MapEntityToModel(new List <FileType>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }