예제 #1
0
 /// <summary>
 /// Entity.Complex => Logic.Complex
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Logic.Complex MapEtoComplex(Entity.Complex c)
 {
     return(new Logic.Complex
     {
         ComplexId = c.ComplexId,
         AddressId = c.AddressId,
         ProviderId = c.ProviderId,
         ComplexName = c.ComplexName,
         ContactNumber = c.ContactNumber
     });
 }
예제 #2
0
        public void ComplexTest()
        {
            var cId = Guid.NewGuid();
            var aId = Guid.NewGuid();
            var pId = Guid.NewGuid();

            var complex = new Entity.Complex
            {
                ComplexId     = cId,
                AddressId     = aId,
                ProviderId    = pId,
                ComplexName   = "Liv+",
                ContactNumber = "(123)456-7890"
            };

            Assert.Equal(cId, complex.ComplexId);
            Assert.Equal(aId, complex.AddressId);
            Assert.Equal(pId, complex.ProviderId);
            Assert.Equal("Liv+", complex.ComplexName);
            Assert.Equal("(123)456-7890", complex.ContactNumber);
        }
예제 #3
0
        public void EtoComplexTest()
        {
            var cId    = Guid.NewGuid();
            var aId    = Guid.NewGuid();
            var pId    = Guid.NewGuid();
            var mapper = new Mapper();

            var c = new Entity.Complex
            {
                ComplexId     = cId,
                AddressId     = aId,
                ProviderId    = pId,
                ComplexName   = "Liv+",
                ContactNumber = "(123)456-7890"
            };

            var cl = mapper.MapEtoComplex(c);

            Assert.Equal(cId, cl.ComplexId);
            Assert.Equal(aId, cl.AddressId);
            Assert.Equal(pId, cl.ProviderId);
            Assert.Equal("Liv+", cl.ComplexName);
            Assert.Equal("(123)456-7890", cl.ContactNumber);
        }