Beispiel #1
0
        public void When(UserFirstNameChanged value)
        {
            _store.UpdateOrThrow(value.AggregateId, (view) =>
            {
                var lname = view.Fullname.Split(',')[0].Trim();

                view.Fullname = $"{lname}, {value.NewFirstName}";
            });
        }
        public void Update_value_with_func_when_key_not_found()
        {
            Action act = () =>
            {
                _guidKeyClassWriter.UpdateOrThrow(Guid.NewGuid(), tv =>
                {
                    tv.Value += 1;
                    return(tv);
                });
            };

            act.ShouldThrowExactly <InvalidOperationException>();
        }