public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), OneToManyReferenceChildDto = new [] { new GuidOneToManyReferenceChildDto { ChildKey = Guid.NewGuid() } } }; var newDto = new GuidParentReferenceDto { ParentKey = oldDto.ParentKey, ParentName = "ParentNameUpdated", OneToManyReferenceChildDto = new [] { new GuidOneToManyReferenceChildDto { ChildKey = oldDto.OneToManyReferenceChildDto[0].ChildKey, Name = "Maximum Whoopee! Enabled" } } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, newDto, 2, 2, 0, 2, 0, 2, 0, 2, 0, false); }
public void delete_with_fk_on_parent_and_reference_data_in_both_parent_and_child_is_invalid() { var newDto = new GuidParentReferenceDto { OneToOneReferenceChildDtoNoFk = new GuidOneToOneReferenceChildDtoNoFk() }; insert_maybe_inserts_in_child_and_always_in_parent(newDto, typeof(GuidOneToOneReferenceChildDtoNoFk), false, false); }
public void delete_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), ManyToManyReferenceChildDto = new [] { new GuidManyToManyReferenceChildDto() } }; delete_deletes_from_link_table_and_parent(oldDto, typeof(GuidManyToManyReferenceChildDto), false); }
public void delete_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ManyToOneReferenceChildDto = new GuidManyToOneReferenceChildDto() }; delete_deletes_from_parent(oldDto, false); }
public void insert_with_reference_data_in_parent_and_child_is_invalid() { var newDto = new GuidParentReferenceDto { ManyToOneReferenceChildDto = new GuidManyToOneReferenceChildDto() }; insert_inserts_in_parent(newDto, false); }
public void insert_with_reference_data_in_parent_and_child_is_invalid() { var newDto = new GuidParentReferenceDto { OneToManyReferenceChildDto = new [] { new GuidOneToManyReferenceChildDto() } }; var cache = new DtoMetadataCache(); GetCommands(cache, null, newDto, 2, 2, 1, 1, 0, 2, 1, 1, 0, false); }
public void insert_with_fk_on_child_and_reference_data_in_both_parent_and_child_is_invalid() { var newDto = new GuidParentReferenceDto { OneToOneReferenceChildDtoWithFk = new GuidOneToOneReferenceChildDtoWithFk() }; var cache = new DtoMetadataCache(); GetCommands(cache, null, newDto, 2, 2, 2, 0, 0, 2, 2, 0, 0, false); }
public void delete_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), OneToManyReferenceChildDto = new [] { new GuidOneToManyReferenceChildDto { ChildKey = Guid.NewGuid() } } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, null, 2, 2, 0, 0, 2, 2, 0, 0, 2, false); }
public void delete_with_fk_on_child_and_reference_data_in_both_parent_and_child_is_invalid() { var parentKey = Guid.NewGuid(); var oldDto = new GuidParentReferenceDto { ParentKey = parentKey, OneToOneReferenceChildDtoWithFk = new GuidOneToOneReferenceChildDtoWithFk { ParentKey = parentKey } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, null, 2, 2, 0, 0, 2, 2, 0, 0, 2, false); }
public void update_with_fk_on_parent_and_reference_data_in_both_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), OneToOneReferenceChildDtoNoFk = new GuidOneToOneReferenceChildDtoNoFk() }; var newDto = new GuidParentReferenceDto { ParentKey = oldDto.ParentKey, ParentName = "I will fight you", OneToOneReferenceChildDtoNoFk = new GuidOneToOneReferenceChildDtoNoFk() }; update_updates_in_parent_and_maybe_child(oldDto, newDto, typeof(GuidOneToOneReferenceChildDtoNoFk), 1, false, false); }
public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), ManyToManyReferenceChildDto = new [] { new GuidManyToManyReferenceChildDto() } }; var newDto = new GuidParentReferenceDto { ParentKey = oldDto.ParentKey, ParentName = "Wibble", ManyToManyReferenceChildDto = new [] { new GuidManyToManyReferenceChildDto { ChildKey = oldDto.ManyToManyReferenceChildDto[0].ChildKey } } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, newDto, 1, 1, 0, 1, 0, 1, 0, 1, 0, false); }
public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), ManyToOneReferenceChildDto = new GuidManyToOneReferenceChildDto() }; var newDto = new GuidParentReferenceDto { ParentKey = oldDto.ParentKey, ParentName = "Now that we've found love what are we gonna do with it?", ManyToOneReferenceChildDto = new GuidManyToOneReferenceChildDto { ChildKey = oldDto.ManyToOneReferenceChildDto.ChildKey } }; update_updates_parent(oldDto, newDto, false); }
public void update_with_fk_on_child_and_reference_data_in_both_parent_and_child_is_invalid() { var parentKey = Guid.NewGuid(); var oldDto = new GuidParentReferenceDto() { ParentKey = parentKey, OneToOneReferenceChildDtoWithFk = new GuidOneToOneReferenceChildDtoWithFk { ParentKey = parentKey } }; var newDto = new GuidParentReferenceDto() { ParentKey = parentKey, ParentName = "Breaking", OneToOneReferenceChildDtoWithFk = new GuidOneToOneReferenceChildDtoWithFk { ParentKey = parentKey } }; update_on_mostly_readonly_child_updates_parent(oldDto, newDto, false); }
public void delete_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new GuidParentReferenceDto { ParentKey = Guid.NewGuid(), OneToManyReferenceChildDto = new [] { new GuidOneToManyReferenceChildDto { ChildKey = Guid.NewGuid() }} }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, null, 2, 2, 0, 0, 2, 2, 0, 0, 2, false); }