camelCaseDave/xrm-mock

View on GitHub
src/xrm-mock/navigation/relationship/relationship.mock.ts

Summary

Maintainability
A
2 hrs
Test Coverage
F
28%
export class RelationshipMock implements Xrm.Navigation.Relationship {
  public attributeName: string;
  public name: string;
  public navigationPropertyName?: string;
  public relationshipType?: XrmEnum.RelationshipType;
  public roleType?: XrmEnum.RoleType;

  constructor(components: IRelationshipComponents) {
    this.attributeName = components.attributeName;
    this.name = components.name;
    this.navigationPropertyName = components.navigationPropertyName;
    this.relationshipType = components.relationshipType;
    this.roleType = components.roleType;
  }
}

export interface IRelationshipComponents {
  attributeName: string;
  name: string;
  navigationPropertyName?: string;
  relationshipType?: XrmEnum.RelationshipType;
  roleType?: XrmEnum.RoleType;
}