示例#1
0
        public void MapBOToModel()
        {
            var mapper          = new BOLTimestampCheckMapper();
            BOTimestampCheck bo = new BOTimestampCheck();

            bo.SetProperties(1, "A", BitConverter.GetBytes(1));
            ApiTimestampCheckResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.Timestamp.Should().BeEquivalentTo(BitConverter.GetBytes(1));
        }
示例#2
0
        public void MapBOToModelList()
        {
            var mapper          = new BOLTimestampCheckMapper();
            BOTimestampCheck bo = new BOTimestampCheck();

            bo.SetProperties(1, "A", BitConverter.GetBytes(1));
            List <ApiTimestampCheckResponseModel> response = mapper.MapBOToModel(new List <BOTimestampCheck>()
            {
                { bo }
            });

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