예제 #1
0
        public void ToUserRecord_NullUserEntity_Throws()
        {
            UserEntity entity = null;

            Exception result = Assert.Throws <ArgumentException>(() => NotifierConverter.ToUserRecord(entity));

            Assert.IsType(typeof(ArgumentException), result);
        }
예제 #2
0
        public void ToUserRecord_GoodUserEntity_UserRecord()
        {
            var entity = new UserEntity {
                Id = Guid.NewGuid(), Name = "user"
            };

            UserRecord result = NotifierConverter.ToUserRecord(entity);

            Assert.Equal(entity.Id, result.Id);
            Assert.Equal(entity.Name, result.Name);
        }
예제 #3
0
        private void NotifyAboutUpdateUserState(UserEntity entity)
        {
            UserRecord record = NotifierConverter.ToUserRecord(entity);

            NotificationSender.NotifyUpdateUserState(record);
        }