Esempio n. 1
0
        public void MapEntityToModelList()
        {
            var  mapper = new DALLinkMapper();
            Link item   = new Link();

            item.SetProperties(1, 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1, "A", 1, "A", "A", 1);
            List <ApiLinkServerResponseModel> response = mapper.MapEntityToModel(new List <Link>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Esempio n. 2
0
        public void MapEntityToModel()
        {
            var  mapper = new DALLinkMapper();
            Link item   = new Link();

            item.SetProperties(1, 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1, "A", 1, "A", "A", 1);
            ApiLinkServerResponseModel response = mapper.MapEntityToModel(item);

            response.AssignedMachineId.Should().Be(1);
            response.ChainId.Should().Be(1);
            response.DateCompleted.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.DateStarted.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.DynamicParameters.Should().Be("A");
            response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Id.Should().Be(1);
            response.LinkStatusId.Should().Be(1);
            response.Name.Should().Be("A");
            response.Order.Should().Be(1);
            response.Response.Should().Be("A");
            response.StaticParameters.Should().Be("A");
            response.TimeoutInSeconds.Should().Be(1);
        }