示例#1
0
        public async Task ChangeAttribute_AddChanges()
        {
            await sut.ChangeAttribute("Foo", "bar", aggregateId, aggregateClassId,
                                      entityId, entityClassId);

            await sut.ChangeAttribute("Foo", "moo", aggregateId, aggregateClassId,
                                      entityId, entityClassId);

            changeTracker.ReceivedWithAnyArgs(1).AddChange <EntityAttributeChangeData <string> >(
                null, null, null, null, null);

            changeTracker.Received(1).AddChange(
                Arg.Is <EntityAttributeChangeData <string> >(
                    x => x.AttributeName == "Foo" &&
                    x.NewValue == "moo" &&
                    x.OldValue == "bar"),
                aggregateId, aggregateClassId, entityId, entityClassId);
        }