public void ConstructingDisputesController_WithNullDisputesRepository_ThrowsArgumentNullException() { // Arrange IDisputesRepository <DisputeModel, DisputeEntity> disputesRepository = null; // Act void Constructing() => new DisputesController( mockDataAccessCradle.Object, disputesRepository, mockIncludeReader.Object, mockPageInformationProvider.Object, mockDisputeFormatter.Object, mockDisputeCollectionFormatter.Object, mockTelemetryClient.Object); // Assert Assert.ThrowsException <ArgumentNullException>((Action)Constructing); }
public void ConstructingDisputesController_WithNullDisputesRepository_HasCorrectParameterNameForArgumentException() { // Arrange const string expectedParameterName = "disputesRepository"; IDisputesRepository <DisputeModel, DisputeEntity> disputesRepository = null; // Act void Constructing() => new DisputesController( mockDataAccessCradle.Object, disputesRepository, mockIncludeReader.Object, mockPageInformationProvider.Object, mockDisputeFormatter.Object, mockDisputeCollectionFormatter.Object, mockTelemetryClient.Object); // Assert ExceptionAssert.HasCorrectParameterNameForArgumentException(Constructing, expectedParameterName); }