public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ParentKey = 1, OneToManyReferenceChildDto = new [] { new OneToManyReferenceChildDto { ChildKey = 2 } } }; var newDto = new ParentReferenceDto { ParentKey = 1, ParentName = "ParentNameUpdated", OneToManyReferenceChildDto = new [] { new OneToManyReferenceChildDto { ChildKey = 2, 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_reference_data_in_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ManyToOneReferenceChildDto = new ManyToOneReferenceChildDto() }; delete_deletes_from_parent(oldDto, false); }
public void insert_with_reference_data_in_parent_and_child_is_invalid() { var newDto = new ParentReferenceDto { ManyToOneReferenceChildDto = new ManyToOneReferenceChildDto() }; insert_inserts_in_parent(newDto, false); }
public void delete_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ParentKey = 1, ManyToManyReferenceChildDto = new [] { new ManyToManyReferenceChildDto() } }; delete_deletes_from_link_table_and_parent(oldDto, typeof(ManyToManyReferenceChildDto), false); }
public void delete_with_fk_on_parent_and_reference_data_in_both_parent_and_child_is_invalid() { var newDto = new ParentReferenceDto { OneToOneReferenceChildDtoNoFk = new OneToOneReferenceChildDtoNoFk() }; insert_maybe_inserts_in_child_and_always_in_parent(newDto, typeof(OneToOneReferenceChildDtoNoFk), false, false); }
public void insert_with_reference_data_in_parent_and_child_is_invalid() { var newDto = new ParentReferenceDto { OneToManyReferenceChildDto = new [] { new OneToManyReferenceChildDto() } }; 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 ParentReferenceDto { OneToOneReferenceChildDtoWithFk = new OneToOneReferenceChildDtoWithFk() }; 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 ParentReferenceDto { ParentKey = 1, OneToManyReferenceChildDto = new [] { new OneToManyReferenceChildDto { ChildKey = 1 } } }; 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 oldDto = new ParentReferenceDto { ParentKey = 43432, OneToOneReferenceChildDtoWithFk = new OneToOneReferenceChildDtoWithFk { ParentKey = 43432 } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, null, 2, 2, 0, 0, 2, 2, 0, 0, 2, false); }
public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ParentKey = 5462, ManyToOneReferenceChildDto = new ManyToOneReferenceChildDto() }; var newDto = new ParentReferenceDto { ParentKey = 5462, ParentName = "Now that we've found love what are we gonna do with it?", ManyToOneReferenceChildDto = new ManyToOneReferenceChildDto() }; update_updates_parent(oldDto, newDto, false); }
public void update_with_reference_data_in_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ParentKey = 1, ManyToManyReferenceChildDto = new [] { new ManyToManyReferenceChildDto() } }; var newDto = new ParentReferenceDto { ParentKey = 1, ParentName = "Wibble", ManyToManyReferenceChildDto = new [] { new ManyToManyReferenceChildDto() } }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, newDto, 1, 1, 0, 1, 0, 1, 0, 1, 0, false); }
public void update_with_fk_on_parent_and_reference_data_in_both_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto { ParentKey = 52879, OneToOneReferenceChildDtoNoFk = new OneToOneReferenceChildDtoNoFk() }; var newDto = new ParentReferenceDto { ParentKey = 52879, ParentName = "I will fight you", OneToOneReferenceChildDtoNoFk = new OneToOneReferenceChildDtoNoFk() }; update_updates_in_parent_and_maybe_child(oldDto, newDto, typeof(OneToOneReferenceChildDtoNoFk), 1, false, false); }
public void update_with_fk_on_child_and_reference_data_in_both_parent_and_child_is_invalid() { var oldDto = new ParentReferenceDto() { ParentKey = 943982, OneToOneReferenceChildDtoWithFk = new OneToOneReferenceChildDtoWithFk { ParentKey = 943982 } }; var newDto = new ParentReferenceDto() { ParentKey = 943982, ParentName = "Breaking", OneToOneReferenceChildDtoWithFk = new OneToOneReferenceChildDtoWithFk { ParentKey = 943982 } }; 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 ParentReferenceDto { ParentKey = 1, OneToManyReferenceChildDto = new [] { new OneToManyReferenceChildDto { ChildKey =1 }} }; var cache = new DtoMetadataCache(); GetCommands(cache, oldDto, null, 2, 2, 0, 0, 2, 2, 0, 0, 2, false); }