Beispiel #1
0
        public void ToPoco()
        {
            var entity = new tblCollector();

            entity.FieldAcronym = "field";
            entity.Title        = "first";
            entity.Id           = Guid.NewGuid();
            entity.WebSite      = "web";

            var poco = _translator.ToDomainEntity(entity);

            Assert.AreEqual("field", poco.Acronym);
            Assert.AreEqual("first", poco.FullName);
            Assert.AreEqual(entity.Id, poco.Id);
            Assert.AreEqual("web", poco.WebSite);
        }
Beispiel #2
0
        public void FillEntity()
        {
            var entity = new tblCollector();
            var poco   = new Collector();

            poco.Acronym  = "pp";
            poco.Id       = Guid.NewGuid();
            poco.FullName = "pavel";
            poco.WebSite  = "cact.cz";

            _translator.FillDataEntity(entity, poco);

            Assert.AreEqual("pp", entity.FieldAcronym);
            Assert.AreEqual(poco.Id, entity.Id);
            Assert.AreEqual("pavel", entity.Title);
            Assert.AreEqual("cact.cz", entity.WebSite);
        }