Ejemplo n.º 1
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLShiftMapper();
            BOShift bo     = new BOShift();

            bo.SetProperties(1, TimeSpan.Parse("0"), DateTime.Parse("1/1/1987 12:00:00 AM"), "A", TimeSpan.Parse("0"));
            List <ApiShiftResponseModel> response = mapper.MapBOToModel(new List <BOShift>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLShiftMapper();
            BOShift bo     = new BOShift();

            bo.SetProperties(1, TimeSpan.Parse("0"), DateTime.Parse("1/1/1987 12:00:00 AM"), "A", TimeSpan.Parse("0"));
            ApiShiftResponseModel response = mapper.MapBOToModel(bo);

            response.EndTime.Should().Be(TimeSpan.Parse("0"));
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.ShiftID.Should().Be(1);
            response.StartTime.Should().Be(TimeSpan.Parse("0"));
        }