コード例 #1
0
        public void QueueConverterModelToEntityTest()
        {
            QueueModel model = new QueueModel(23, Guid.NewGuid().ToString(), Guid.NewGuid().ToString());

            IQueueConverter converter = new QueueConverter(LoggerFactory);

            QueueEntity actual = converter.Convert(model);

            Assert.AreEqual(model.Id, actual.Id);
            Assert.AreEqual(model.Name, actual.Name);
            Assert.AreEqual(model.Description, actual.Description);
        }
コード例 #2
0
        public void QueueConverterEntityToModelTest()
        {
            QueueEntity entity = new QueueEntity
            {
                Id          = 23,
                Name        = Guid.NewGuid().ToString(),
                Description = Guid.NewGuid().ToString()
            };

            IQueueConverter converter = new QueueConverter(LoggerFactory);

            QueueModel actual = converter.Convert(entity);

            Assert.AreEqual(entity.Id, actual.Id);
            Assert.AreEqual(entity.Name, actual.Name);
            Assert.AreEqual(entity.Description, actual.Description);
        }