Skip to content

Unit tests and refactoring of AzureDataFactoryCopy #6

@kfaerk

Description

@kfaerk

There are currently no unit tests of the data factory copy activity, only a few integration tests.
Add unit tests that verify expected behaviour of AzureDataFactoryCopy (https://github.com/Watts-Energy/Watts.Azure/blob/development/Watts.Azure.Common/DataFactory/Copy/AzureDataFactoryCopy.cs).

To do that, the DataFactoryManagementClient should be wrapped somehow, so that unit tests can inject a mock instead of working against the concrete implementation.
Important things to test:

  • When the timeout period is exceeded, MonitorStatusUntilDone finishes.
  • When the slice State becomes Failed or Completed, MonitorStatusUntilDone finishes
  • When an exception occurs in MonitorStatusUntilDone, RetryAuthentication is invoked up to a maximum of 3 times.
  • General testing of exceptions not being swallowed, but rethrown.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions