public void ConstructingPersonsController_WithNullInsolvenciesFormatter_ThrowsArgumentNullException() { // Arrange IHalFormatter <InsolvencyOrderPersonModel> halFormatter = null; // Act void Constructing() => new InsolvencyOrderPersonsController( mockDataAccessCradle.Object, mockPersonsRepository.Object, mockIncludeReader.Object, mockPageInformationProvider.Object, halFormatter, mockHalCollectionFormatter.Object, mockTelemetryClient.Object); // Assert Assert.ThrowsException <ArgumentNullException>((Action)Constructing); }
public void ConstructingDisputesController_WithNullDisputeFormatter_ThrowsArgumentNullException() { // Arrange IHalFormatter <DisputeModel> disputeFormatter = null; // Act void Constructing() => new DisputesController( mockDataAccessCradle.Object, mockDisputeRepository.Object, mockIncludeReader.Object, mockPageInformationProvider.Object, disputeFormatter, mockDisputeCollectionFormatter.Object, mockTelemetryClient.Object); // Assert Assert.ThrowsException <ArgumentNullException>((Action)Constructing); }
public void ConstructingPersonsController_WithNullInsolvenciesFormatter_HasCorrectParameterNameForArgumentException() { // Arrange const string expectedParameterName = "personFormatter"; IHalFormatter <InsolvencyOrderPersonModel> halFormatter = null; // Act void Constructing() => new InsolvencyOrderPersonsController( mockDataAccessCradle.Object, mockPersonsRepository.Object, mockIncludeReader.Object, mockPageInformationProvider.Object, halFormatter, mockHalCollectionFormatter.Object, mockTelemetryClient.Object); // Assert ExceptionAssert.HasCorrectParameterNameForArgumentException(Constructing, expectedParameterName); }
public void ConstructingDisputesController_WithNullDisputeFormatter_HasCorrectParameterNameForArgumentException() { // Arrange const string expectedParameterName = "disputeFormatter"; IHalFormatter <DisputeModel> disputeFormatter = null; // Act void Constructing() => new DisputesController( mockDataAccessCradle.Object, mockDisputeRepository.Object, mockIncludeReader.Object, mockPageInformationProvider.Object, disputeFormatter, mockDisputeCollectionFormatter.Object, mockTelemetryClient.Object); // Assert ExceptionAssert.HasCorrectParameterNameForArgumentException(Constructing, expectedParameterName); }