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

            bo.SetProperties(1, "A", "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");
            List <ApiMachineResponseModel> response = mapper.MapBOToModel(new List <BOMachine>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 2
0
        public void MapBOToModelList()
        {
            var       mapper = new BOLMachineMapper();
            BOMachine bo     = new BOMachine();

            bo.SetProperties("A", "A", "A", "A", true, "A", "A", "A", "A", "A", "A", "A", "A");
            List <ApiMachineResponseModel> response = mapper.MapBOToModel(new List <BOMachine>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 3
0
        public void MapModelToBO()
        {
            var mapper = new BOLMachineMapper();
            ApiMachineRequestModel model = new ApiMachineRequestModel();

            model.SetProperties("A", "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");
            BOMachine response = mapper.MapModelToBO(1, model);

            response.Description.Should().Be("A");
            response.JwtKey.Should().Be("A");
            response.LastIpAddress.Should().Be("A");
            response.MachineGuid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Name.Should().Be("A");
        }
Ejemplo n.º 4
0
        public void MapBOToModel()
        {
            var       mapper = new BOLMachineMapper();
            BOMachine bo     = new BOMachine();

            bo.SetProperties(1, "A", "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");
            ApiMachineResponseModel response = mapper.MapBOToModel(bo);

            response.Description.Should().Be("A");
            response.Id.Should().Be(1);
            response.JwtKey.Should().Be("A");
            response.LastIpAddress.Should().Be("A");
            response.MachineGuid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Name.Should().Be("A");
        }
Ejemplo n.º 5
0
        public void MapEFToBO()
        {
            var     mapper = new DALMachineMapper();
            Machine entity = new Machine();

            entity.SetProperties("A", 1, "A", "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A");

            BOMachine response = mapper.MapEFToBO(entity);

            response.Description.Should().Be("A");
            response.Id.Should().Be(1);
            response.JwtKey.Should().Be("A");
            response.LastIpAddress.Should().Be("A");
            response.MachineGuid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Name.Should().Be("A");
        }
Ejemplo n.º 6
0
        public void MapModelToBO()
        {
            var mapper = new BOLMachineMapper();
            ApiMachineRequestModel model = new ApiMachineRequestModel();

            model.SetProperties("A", "A", "A", true, "A", "A", "A", "A", "A", "A", "A", "A");
            BOMachine response = mapper.MapModelToBO("A", model);

            response.CommunicationStyle.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.Fingerprint.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.MachinePolicyId.Should().Be("A");
            response.Name.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Roles.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
            response.Thumbprint.Should().Be("A");
        }
Ejemplo n.º 7
0
        public void MapBOToModel()
        {
            var       mapper = new BOLMachineMapper();
            BOMachine bo     = new BOMachine();

            bo.SetProperties("A", "A", "A", "A", true, "A", "A", "A", "A", "A", "A", "A", "A");
            ApiMachineResponseModel response = mapper.MapBOToModel(bo);

            response.CommunicationStyle.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.Fingerprint.Should().Be("A");
            response.Id.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.MachinePolicyId.Should().Be("A");
            response.Name.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Roles.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
            response.Thumbprint.Should().Be("A");
        }
Ejemplo n.º 8
0
        public void MapEFToBO()
        {
            var     mapper = new DALMachineMapper();
            Machine entity = new Machine();

            entity.SetProperties("A", "A", "A", "A", true, "A", "A", "A", "A", "A", "A", "A", "A");

            BOMachine response = mapper.MapEFToBO(entity);

            response.CommunicationStyle.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.Fingerprint.Should().Be("A");
            response.Id.Should().Be("A");
            response.IsDisabled.Should().Be(true);
            response.JSON.Should().Be("A");
            response.MachinePolicyId.Should().Be("A");
            response.Name.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Roles.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
            response.Thumbprint.Should().Be("A");
        }