-
Notifications
You must be signed in to change notification settings - Fork 11
Breaking Changes
Any time a breaking change will at least the minor number should be incremented. Below is a list of breaking changes and the fixes required.
DLaB.Xrm.Test.Builders.EntityBuilder has been renamed to DLaB.Xrm.Test.Builders.DLaBBuilder and an extra generic parameter has been added.
The extra parameter was added to allow any base implementation to return the most derived class type in fluent methods. Since this was a breaking change, it made sense to rename it as well so that any class inheriting it with the name EntityBuilder won't require a namespace to avoid name collisions.
Steps to resolve breaking changes
- Any class that inherits from DLaB.Xrm.Test.Builders.EntityBuilder will now need to be updated to inherit from DLaB.Xrm.Test.Builders.EntityBuilder. An extra type parameter that is defined as the type of the class itself must be added as well.
- The TestSettings.EntityBuilder.ConfigureDerivedAssembly normally is set to the custom project specific EntityBuilder. If so, it will need to be updated to a typed entity specific builder, since I don't think it's possible to pass in EntityBuilder<Entity,>.
EntityBuilder.cs - Or any class that would inherit from DLaB.Xrm.Test.Builders.EntityBuilder
public abstract class EntityBuilder<TEntity> : DLaB.Xrm.Test.Builders.EntityBuilder<TEntity> where TEntity : Entity
{
}
ActionBuilder.cs - Or any class that would inherit from a base EntityBuilder
public class AccountBuilder : EntityBuilder<Account>
{
...
}
TestInitializer.cs
TestSettings.EntityBuilder.ConfigureDerivedAssembly<EntityBuilder<Entity>>();
EntityBuilder.cs
public abstract class EntityBuilder<TEntity, TBuilder> : DLaB.Xrm.Test.Builders.DLaBEntityBuilder<TEntity, TBuilder>
where TBuilder : EntityBuilder<TEntity, TBuilder>
where TEntity : Entity
{
}
ActionBuilder.cs
public class AccountBuilder : EntityBuilder<Account, AccountBuilder>
{
...
}
TestInitializer.cs
TestSettings.EntityBuilder.ConfigureDerivedAssembly<AccountBuilder>();