Beispiel #1
0
 /// <summary>
 /// Entity.AmenityRoom => Logic.AmenityRoom
 /// </summary>
 /// <param name="ar"></param>
 /// <returns></returns>
 public Logic.AmenityRoom MapEtoAmenityRoom(Entity.AmenityRoom ar)
 {
     return(new Logic.AmenityRoom
     {
         AmenityRoomId = ar.AmenityRoomId,
         AmenityId = ar.AmenityId,
         RoomId = ar.RoomId
     });
 }
        public void AmenityRoomTest()
        {
            var arId = Guid.NewGuid();
            var amId = Guid.NewGuid();
            var guid = Guid.NewGuid();

            var ar = new Entity.AmenityRoom
            {
                AmenityRoomId = arId,
                AmenityId     = amId,
                RoomId        = guid
            };

            Assert.Equal(arId, ar.AmenityRoomId);
            Assert.Equal(amId, ar.AmenityId);
            Assert.Equal(guid, ar.RoomId);
        }
Beispiel #3
0
        public void EtoAmenityRoom()
        {
            var arId   = Guid.NewGuid();
            var amId   = Guid.NewGuid();
            var rId    = Guid.NewGuid();
            var mapper = new Mapper();

            var ar = new Entity.AmenityRoom
            {
                AmenityRoomId = arId,
                AmenityId     = amId,
                RoomId        = rId
            };

            var lAr = mapper.MapEtoAmenityRoom(ar);

            Assert.Equal(arId, lAr.AmenityRoomId);
            Assert.Equal(amId, lAr.AmenityId);
            Assert.Equal(rId, lAr.RoomId);
        }