Exemple #1
0
        public void MapEntityToModelList()
        {
            var  mapper = new DALCallMapper();
            Call item   = new Call();

            item.SetProperties(1, 1, 1, 1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1);
            List <ApiCallServerResponseModel> response = mapper.MapEntityToModel(new List <Call>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Exemple #2
0
        public void MapEntityToModel()
        {
            var  mapper = new DALCallMapper();
            Call item   = new Call();

            item.SetProperties(1, 1, 1, 1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1);
            ApiCallServerResponseModel response = mapper.MapEntityToModel(item);

            response.AddressId.Should().Be(1);
            response.CallDispositionId.Should().Be(1);
            response.CallStatusId.Should().Be(1);
            response.CallString.Should().Be("A");
            response.CallTypeId.Should().Be(1);
            response.DateCleared.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.DateCreated.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.DateDispatched.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.QuickCallNumber.Should().Be(1);
        }