Skip to content

Commit

Permalink
ApprovalTests CodeFix
Browse files Browse the repository at this point in the history
  • Loading branch information
semalaiappan committed Mar 12, 2024
1 parent 047a464 commit bd7b3b7
Show file tree
Hide file tree
Showing 8 changed files with 2,992 additions and 5,231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,22 @@ public ParentMappingContract(
bool isParentAddressesSupported,
bool isParentNameReferenceSupported,
bool isParentStudentSchoolAssociationsSupported,
bool isParentAddressesItemCreatable,
Func<IParentAddress, bool> isParentAddressIncluded,
bool isParentStudentSchoolAssociationsItemCreatable,
Func<IParentStudentSchoolAssociation, bool> isParentStudentSchoolAssociationIncluded
bool isParentAddressesCreatable,
bool isParentStudentSchoolAssociationsCreatable
)
{
IsParentAddressesSupported = isParentAddressesSupported;
IsParentNameReferenceSupported = isParentNameReferenceSupported;
IsParentStudentSchoolAssociationsSupported = isParentStudentSchoolAssociationsSupported;
IsParentAddressesItemCreatable = isParentAddressesItemCreatable;
IsParentAddressIncluded = isParentAddressIncluded;
IsParentStudentSchoolAssociationsItemCreatable = isParentStudentSchoolAssociationsItemCreatable;
IsParentStudentSchoolAssociationIncluded = isParentStudentSchoolAssociationIncluded;
IsParentAddressesCreatable = isParentAddressesCreatable;
IsParentStudentSchoolAssociationsCreatable = isParentStudentSchoolAssociationsCreatable;
}

public bool IsParentAddressesSupported { get; }
public bool IsParentNameReferenceSupported { get; }
public bool IsParentStudentSchoolAssociationsSupported { get; }
public bool IsParentAddressesItemCreatable { get; }
public Func<IParentAddress, bool> IsParentAddressIncluded { get; }
public bool IsParentStudentSchoolAssociationsItemCreatable { get; }
public Func<IParentStudentSchoolAssociation, bool> IsParentStudentSchoolAssociationIncluded { get; }
public bool IsParentAddressesCreatable { get; }
public bool IsParentStudentSchoolAssociationsCreatable { get; }

bool IMappingContract.IsMemberSupported(string memberName)
{
Expand All @@ -144,9 +138,9 @@ bool IMappingContract.IsItemCreatable(string memberName)
switch (memberName)
{
case "ParentAddresses":
return IsParentAddressesItemCreatable;
return IsParentAddressesCreatable;
case "ParentStudentSchoolAssociations":
return IsParentStudentSchoolAssociationsItemCreatable;
return IsParentStudentSchoolAssociationsCreatable;
default:
throw new Exception($"Unknown child item '{memberName}'.");
}
Expand Down Expand Up @@ -329,8 +323,6 @@ bool IMappingContract.IsItemCreatable(string memberName)
{
switch (memberName)
{
case "SchoolAddress":
return IsSchoolAddressCreatable;
default:
throw new Exception($"Unknown child item '{memberName}'.");
}
Expand Down Expand Up @@ -467,28 +459,22 @@ public StaffMappingContract(
bool isStaffAddressesSupported,
bool isStaffNameReferenceSupported,
bool isStaffStudentSchoolAssociationsSupported,
bool isStaffAddressesItemCreatable,
Func<IStaffAddress, bool> isStaffAddressIncluded,
bool isStaffStudentSchoolAssociationsItemCreatable,
Func<IStaffStudentSchoolAssociation, bool> isStaffStudentSchoolAssociationIncluded
bool isStaffAddressesCreatable,
bool isStaffStudentSchoolAssociationsCreatable
)
{
IsStaffAddressesSupported = isStaffAddressesSupported;
IsStaffNameReferenceSupported = isStaffNameReferenceSupported;
IsStaffStudentSchoolAssociationsSupported = isStaffStudentSchoolAssociationsSupported;
IsStaffAddressesItemCreatable = isStaffAddressesItemCreatable;
IsStaffAddressIncluded = isStaffAddressIncluded;
IsStaffStudentSchoolAssociationsItemCreatable = isStaffStudentSchoolAssociationsItemCreatable;
IsStaffStudentSchoolAssociationIncluded = isStaffStudentSchoolAssociationIncluded;
IsStaffAddressesCreatable = isStaffAddressesCreatable;
IsStaffStudentSchoolAssociationsCreatable = isStaffStudentSchoolAssociationsCreatable;
}

public bool IsStaffAddressesSupported { get; }
public bool IsStaffNameReferenceSupported { get; }
public bool IsStaffStudentSchoolAssociationsSupported { get; }
public bool IsStaffAddressesItemCreatable { get; }
public Func<IStaffAddress, bool> IsStaffAddressIncluded { get; }
public bool IsStaffStudentSchoolAssociationsItemCreatable { get; }
public Func<IStaffStudentSchoolAssociation, bool> IsStaffStudentSchoolAssociationIncluded { get; }
public bool IsStaffAddressesCreatable { get; }
public bool IsStaffStudentSchoolAssociationsCreatable { get; }

bool IMappingContract.IsMemberSupported(string memberName)
{
Expand All @@ -515,9 +501,9 @@ bool IMappingContract.IsItemCreatable(string memberName)
switch (memberName)
{
case "StaffAddresses":
return IsStaffAddressesItemCreatable;
return IsStaffAddressesCreatable;
case "StaffStudentSchoolAssociations":
return IsStaffStudentSchoolAssociationsItemCreatable;
return IsStaffStudentSchoolAssociationsCreatable;
default:
throw new Exception($"Unknown child item '{memberName}'.");
}
Expand Down Expand Up @@ -711,8 +697,6 @@ bool IMappingContract.IsItemCreatable(string memberName)
{
switch (memberName)
{
case "StudentAddress":
return IsStudentAddressCreatable;
default:
throw new Exception($"Unknown child item '{memberName}'.");
}
Expand Down
Loading

0 comments on commit bd7b3b7

Please sign in to comment.