public void MapEFToBOList()
        {
            var mapper = new DALOctopusServerNodeMapper();
            OctopusServerNode entity = new OctopusServerNode();

            entity.SetProperties("A", true, "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), 1, "A", "A");

            List <BOOctopusServerNode> response = mapper.MapEFToBO(new List <OctopusServerNode>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public virtual OctopusServerNode MapBOToEF(
            BOOctopusServerNode bo)
        {
            OctopusServerNode efOctopusServerNode = new OctopusServerNode();

            efOctopusServerNode.SetProperties(
                bo.Id,
                bo.IsInMaintenanceMode,
                bo.JSON,
                bo.LastSeen,
                bo.MaxConcurrentTasks,
                bo.Name,
                bo.Rank);
            return(efOctopusServerNode);
        }
        public void MapEFToBO()
        {
            var mapper = new DALOctopusServerNodeMapper();
            OctopusServerNode entity = new OctopusServerNode();

            entity.SetProperties("A", true, "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), 1, "A", "A");

            BOOctopusServerNode response = mapper.MapEFToBO(entity);

            response.Id.Should().Be("A");
            response.IsInMaintenanceMode.Should().Be(true);
            response.JSON.Should().Be("A");
            response.LastSeen.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.MaxConcurrentTasks.Should().Be(1);
            response.Name.Should().Be("A");
            response.Rank.Should().Be("A");
        }