public static void Constructor_NullParameter_ThrowsArgumentNullException(bool hasPatientCsvWriter, bool hasPriceTypeCsvWriter)
        {
            var context = CreatePurchasingDocumentServiceTestContext.Setup();

            var builder = CreatePurchasingDocumentServiceBuilder
                          .Create()
                          .WithPatientNumbersCsvWriter(hasPatientCsvWriter ? context.PatientCsvWriterMock.Object : null)
                          .WithPriceTypeCsvWriter(hasPriceTypeCsvWriter ? context.PriceCsvWriterMock.Object : null);

            Assert.Throws <ArgumentNullException>(() => builder.Build());
        }
            private CreatePurchasingDocumentServiceTestContext()
            {
                PatientCsvWriterMock = new Mock <ICsvStreamWriter <OdooPatientNumbersOrderItem> >();
                PatientCsvWriterMock.Setup(w =>
                                           w.WriteRecordsAsync(It.IsAny <Stream>(), It.IsAny <IEnumerable <OdooPatientNumbersOrderItem> >()));

                PriceCsvWriterMock = new Mock <ICsvStreamWriter <OdooOrderItem> >();
                PriceCsvWriterMock.Setup(w => w.WriteRecordsAsync(It.IsAny <Stream>(), It.IsAny <IEnumerable <OdooOrderItem> >()));

                CreatePurchasingDocumentService = CreatePurchasingDocumentServiceBuilder
                                                  .Create()
                                                  .WithPatientNumbersCsvWriter(PatientCsvWriterMock.Object)
                                                  .WithPriceTypeCsvWriter(PriceCsvWriterMock.Object)
                                                  .Build();
            }