Пример #1
0
        public void MapBOToModelList()
        {
            var mapper             = new BOLOctopusServerNodeMapper();
            BOOctopusServerNode bo = new BOOctopusServerNode();

            bo.SetProperties("A", true, "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), 1, "A", "A");
            List <ApiOctopusServerNodeResponseModel> response = mapper.MapBOToModel(new List <BOOctopusServerNode>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapBOToModel()
        {
            var mapper             = new BOLOctopusServerNodeMapper();
            BOOctopusServerNode bo = new BOOctopusServerNode();

            bo.SetProperties("A", true, "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), 1, "A", "A");
            ApiOctopusServerNodeResponseModel response = mapper.MapBOToModel(bo);

            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");
        }