Beispiel #1
0
 /// <summary>
 /// Entity.AmenityComplex => Logic.AmenityComplex
 /// </summary>
 /// <param name="ac"></param>
 /// <returns></returns>
 public Logic.AmenityComplex MapEtoAmenityComplex(Entity.AmenityComplex ac)
 {
     return(new Logic.AmenityComplex
     {
         AmenityComplexId = ac.AmenityComplexId,
         AmenityId = ac.AmenityId,
         ComplexId = ac.ComplexId
     });
 }
        public void AmenityComplexTest()
        {
            var acId  = Guid.NewGuid();
            var amId  = Guid.NewGuid();
            var guid1 = Guid.NewGuid();

            var ac = new Entity.AmenityComplex
            {
                AmenityComplexId = acId,
                AmenityId        = amId,
                ComplexId        = guid1
            };

            Assert.Equal(acId, ac.AmenityComplexId);
            Assert.Equal(amId, ac.AmenityId);
            Assert.Equal(guid1, ac.ComplexId);
        }
Beispiel #3
0
        public void EtoAmenityComplexTest()
        {
            var acId   = Guid.NewGuid();
            var amId   = Guid.NewGuid();
            var cId    = Guid.NewGuid();
            var mapper = new Mapper();

            var ac = new Entity.AmenityComplex
            {
                AmenityComplexId = acId,
                AmenityId        = amId,
                ComplexId        = cId
            };

            var lAc = mapper.MapEtoAmenityComplex(ac);

            Assert.Equal(acId, lAc.AmenityComplexId);
            Assert.Equal(amId, lAc.AmenityId);
            Assert.Equal(cId, lAc.ComplexId);
        }