Пример #1
0
        public void MapEFToBOList()
        {
            var         mapper = new DALVariableSetMapper();
            VariableSet entity = new VariableSet();

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

            List <BOVariableSet> response = mapper.MapEFToBO(new List <VariableSet>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapEFToBO()
        {
            var         mapper = new DALVariableSetMapper();
            VariableSet entity = new VariableSet();

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

            BOVariableSet response = mapper.MapEFToBO(entity);

            response.Id.Should().Be("A");
            response.IsFrozen.Should().Be(true);
            response.JSON.Should().Be("A");
            response.OwnerId.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Version.Should().Be(1);
        }
Пример #3
0
        public void MapBOToEF()
        {
            var mapper = new DALVariableSetMapper();
            var bo     = new BOVariableSet();

            bo.SetProperties("A", true, "A", "A", "A", 1);

            VariableSet response = mapper.MapBOToEF(bo);

            response.Id.Should().Be("A");
            response.IsFrozen.Should().Be(true);
            response.JSON.Should().Be("A");
            response.OwnerId.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.Version.Should().Be(1);
        }