Ejemplo n.º 1
0
        private static SampleFileData MapSampleFileData(Hatfield.EnviroData.Core.Action actionData, Result sampleResultDomain)
        {
            if (sampleResultDomain != null)
            {
                var sampleFileData = new SampleFileData();
                sampleFileData.SampledDateTime = sampleResultDomain.ResultDateTime;

                try
                {
                    sampleFileData.LabName = actionData.Method.Organization.OrganizationName;
                }
                catch (NullReferenceException)
                {
                    sampleFileData.LabName = null;
                }

                //Map data from extension properties
                sampleFileData = MapFromExtensionProperties(sampleFileData, sampleResultDomain.ResultExtensionPropertyValues);

                return(sampleFileData);
            }
            else
            {
                return(null);
            }
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();
            chemistry.OriginalChemName = "XYZ";

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryVariableMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var variable = mapper.Draft(esdatModel, chemistry);            

            Assert.AreEqual(defaultValueProvider.DefaultVariableTypeCVChemistry, variable.VariableTypeCV);
            Assert.AreEqual(chemistry.ChemCode, variable.VariableCode);

            // This is temporarily hard-coded
            Assert.AreEqual("1,1,1-Trichloroethane", variable.VariableNameCV);

            Assert.AreEqual(chemistry.OriginalChemName, variable.VariableDefinition);
            Assert.AreEqual(defaultValueProvider.DefaultVariableSpeciationCV, variable.SpeciationCV);
            Assert.AreEqual(defaultValueProvider.DefaultVariableNoDataValue, variable.NoDataValue);
        }
        public void SampleFileDataConstructorTest()
        {
            var sampleFileData = new SampleFileData("test sample code",
                                                    new DateTime(2015, 5, 26),
                                                    "test field ID",
                                                    1.0,
                                                    "test matrix type",
                                                    "test sample type",
                                                    "test parent sample",
                                                    "sdg",
                                                    "test lab name",
                                                    "test lab sample ID",
                                                    "test comment",
                                                    "test lab report number");

            Assert.NotNull(sampleFileData);
            Assert.AreEqual("test sample code", sampleFileData.SampleCode);
            Assert.AreEqual(new DateTime(2015, 5, 26), sampleFileData.SampledDateTime);
            Assert.AreEqual("test field ID", sampleFileData.FieldID);
            Assert.AreEqual(1.0, sampleFileData.SampleDepth);
            Assert.AreEqual("test matrix type", sampleFileData.MatrixType);
            Assert.AreEqual("test sample type", sampleFileData.SampleType);
            Assert.AreEqual("test parent sample", sampleFileData.ParentSample);
            Assert.AreEqual("sdg", sampleFileData.SDG);
            Assert.AreEqual("test lab name", sampleFileData.LabName);
            Assert.AreEqual("test lab sample ID", sampleFileData.LabSampleID);
            Assert.AreEqual("test comment", sampleFileData.Comments);
            Assert.AreEqual("test lab report number", sampleFileData.LabReportNumber);
        }
        public void Scaffold()
        {
            var esdatModel = new ESDATModel();

            var labName = "XYZ Labs";
            var sample  = new SampleFileData();

            sample.LabName = labName;

            var chemistry = new ChemistryFileData();

            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new SampleCollectionOrganizationMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var organization = mapper.Draft(esdatModel);

            Assert.AreEqual(defaultValueProvider.OrganizationTypeCVSampleCollection, organization.OrganizationTypeCV);
            Assert.AreEqual(mapper.GetOrganizationCode(defaultValueProvider.OrganizationNameSampleCollection), organization.OrganizationCode);
            Assert.AreEqual(defaultValueProvider.OrganizationNameSampleCollection, organization.OrganizationName);
        }
Ejemplo n.º 5
0
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            chemistry.OriginalChemName = "XYZ";

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryVariableMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var variable = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultVariableTypeCVChemistry, variable.VariableTypeCV);
            Assert.AreEqual(chemistry.ChemCode, variable.VariableCode);

            // This is temporarily hard-coded
            Assert.AreEqual("1,1,1-Trichloroethane", variable.VariableNameCV);

            Assert.AreEqual(chemistry.OriginalChemName, variable.VariableDefinition);
            Assert.AreEqual(defaultValueProvider.DefaultVariableSpeciationCV, variable.SpeciationCV);
            Assert.AreEqual(defaultValueProvider.DefaultVariableNoDataValue, variable.NoDataValue);
        }
Ejemplo n.º 6
0
        private static SampleFileData MapFromExtensionProperties(SampleFileData sampleFileData, ICollection <ResultExtensionPropertyValue> extensionPropertyValues)
        {
            var propertyValueDictionary = extensionPropertyValues.ToDictionary(x => x.ExtensionProperty.PropertyName, x => x.PropertyValue);

            sampleFileData.SampleCode = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleCode) ?
                                        propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleCode] :
                                        string.Empty;

            sampleFileData.FieldID = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyFieldID) ?
                                     propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyFieldID] :
                                     string.Empty;

            sampleFileData.SampleDepth = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleDepth) ?
                                         MappingHelper.ToNullableDouble(propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleDepth]) :
                                         null;

            sampleFileData.MatrixType = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyMatrixType) ?
                                        propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyMatrixType] :
                                        string.Empty;

            sampleFileData.SampleType = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleType) ?
                                        propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySampleType] :
                                        string.Empty;

            sampleFileData.ParentSample = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyParentSample) ?
                                          propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyParentSample] :
                                          string.Empty;

            sampleFileData.SDG = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySDG) ?
                                 propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeySDG] :
                                 string.Empty;

            sampleFileData.LabSampleID = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyLabSampleID) ?
                                         propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyLabSampleID] :
                                         string.Empty;

            sampleFileData.Comments = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyComments) ?
                                      propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyComments] :
                                      string.Empty;

            sampleFileData.LabReportNumber = propertyValueDictionary.ContainsKey(ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyLabReportNumber) ?
                                             propertyValueDictionary[ESDATSampleCollectionConstants.ResultExtensionPropertyValueKeyLabReportNumber] :
                                             string.Empty;

            return(sampleFileData);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryMethodMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var method = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultMethodTypeCVChemistry, method.MethodTypeCV);
            Assert.AreEqual(chemistry.MethodType, method.MethodCode);
            Assert.AreEqual(chemistry.MethodName, method.MethodName);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryMeasurementResultMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var measurementResult = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.MeasurementResultCensorCodeCVChemistry, measurementResult.CensorCodeCV);
            Assert.AreEqual(defaultValueProvider.MeasurementResultQualityCodeCVChemistry, measurementResult.QualityCodeCV);
            Assert.AreEqual(defaultValueProvider.MeasurementResultAggregationStatisticCVChemistry, measurementResult.AggregationStatisticCV);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryFeatureActionMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var featureAction = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(0, featureAction.FeatureActionID);
            Assert.AreEqual(0, featureAction.SamplingFeatureID);
            Assert.AreEqual(0, featureAction.ActionID);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistrySamplingFeatureMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var samplingFeature = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultSamplingFeatureTypeCVChemistry, samplingFeature.SamplingFeatureTypeCV);
            Assert.AreEqual(string.Empty, samplingFeature.SamplingFeatureCode);
            Assert.AreEqual(new Guid(), samplingFeature.SamplingFeatureUUID);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryFeatureActionMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var featureAction = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(0, featureAction.FeatureActionID);
            Assert.AreEqual(0, featureAction.SamplingFeatureID);
            Assert.AreEqual(0, featureAction.ActionID);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryMeasurementResultMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var measurementResult = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.MeasurementResultCensorCodeCVChemistry, measurementResult.CensorCodeCV);
            Assert.AreEqual(defaultValueProvider.MeasurementResultQualityCodeCVChemistry, measurementResult.QualityCodeCV);
            Assert.AreEqual(defaultValueProvider.MeasurementResultAggregationStatisticCVChemistry, measurementResult.AggregationStatisticCV);
        }
Ejemplo n.º 13
0
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryMethodMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var method = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultMethodTypeCVChemistry, method.MethodTypeCV);
            Assert.AreEqual(chemistry.MethodType, method.MethodCode);
            Assert.AreEqual(chemistry.MethodName, method.MethodName);
        }
Ejemplo n.º 14
0
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistrySamplingFeatureMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var samplingFeature = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultSamplingFeatureTypeCVChemistry, samplingFeature.SamplingFeatureTypeCV);
            Assert.AreEqual("Unknown", samplingFeature.SamplingFeatureCode);
            Assert.AreEqual(new Guid(), samplingFeature.SamplingFeatureUUID);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryResultMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var result = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.ResultTypeCVChemistry, result.ResultTypeCV);
            Assert.AreEqual(chemistry.AnalysedDate, result.ResultDateTime);
            Assert.AreEqual(defaultValueProvider.ResultSampledMediumCVChemistry, result.SampledMediumCV);
            Assert.AreEqual(1, result.ValueCount);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();
            chemistry.Result = 101;
            chemistry.AnalysedDate = DateTime.Now;

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryMeasurementResultValueMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var measurementResultValue = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(chemistry.Result, measurementResultValue.DataValue);
            Assert.AreEqual(chemistry.AnalysedDate, measurementResultValue.ValueDateTime);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();
            chemistry.ResultUnit = "Unit";

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryUnitMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var unit = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultUnitsTypeCVChemistry, unit.UnitsTypeCV);
            Assert.AreEqual(mapper.AbbereviateUnit(chemistry.ResultUnit), unit.UnitsAbbreviation);
            Assert.AreEqual(chemistry.ResultUnit, unit.UnitsName);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            var esdatModel = new ESDATModel();
            var sample = new SampleFileData();
            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new ChemistryResultMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var result = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.ResultTypeCVChemistry, result.ResultTypeCV);
            Assert.AreEqual(chemistry.AnalysedDate, result.ResultDateTime);
            Assert.AreEqual(defaultValueProvider.ResultSampledMediumCVChemistry, result.SampledMediumCV);
            Assert.AreEqual(1, result.ValueCount);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            chemistry.Result       = 101;
            chemistry.AnalysedDate = DateTime.Now;

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryMeasurementResultValueMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var measurementResultValue = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(chemistry.Result, measurementResultValue.DataValue);
            Assert.AreEqual(chemistry.AnalysedDate, measurementResultValue.ValueDateTime);
        }
        public void ScaffoldTest()
        {
            var chemistry = new ChemistryFileData();

            chemistry.ResultUnit = "Unit";

            var esdatModel           = new ESDATModel();
            var sample               = new SampleFileData();
            var mockDb               = new Mock <IDbContext>();
            var mockDbContext        = mockDb.Object;
            var duplicateChecker     = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData   = WayToHandleNewData.ThrowExceptionForNewData;
            var results              = new List <IResult>();
            var mapper               = new ChemistryUnitMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var unit = mapper.Draft(esdatModel, chemistry);

            Assert.AreEqual(defaultValueProvider.DefaultUnitsTypeCVChemistry, unit.UnitsTypeCV);
            Assert.AreEqual(mapper.AbbereviateUnit(chemistry.ResultUnit), unit.UnitsAbbreviation);
            Assert.AreEqual(chemistry.ResultUnit, unit.UnitsName);
        }
        public void Scaffold()
        {
            var esdatModel = new ESDATModel();

            var labName = "XYZ Labs";
            var sample = new SampleFileData();
            sample.LabName = labName;

            var chemistry = new ChemistryFileData();

            var mockDb = new Mock<IDbContext>();
            var mockDbContext = mockDb.Object;
            var duplicateChecker = new ODM2DuplicateChecker(mockDbContext);
            var defaultValueProvider = new StaticWQDefaultValueProvider();
            var wayToHandleNewData = WayToHandleNewData.ThrowExceptionForNewData;
            var results = new List<IResult>();
            var mapper = new SampleCollectionOrganizationMapper(duplicateChecker, defaultValueProvider, wayToHandleNewData, results);

            var organization = mapper.Draft(esdatModel);

            Assert.AreEqual(defaultValueProvider.OrganizationTypeCVSampleCollection, organization.OrganizationTypeCV);
            Assert.AreEqual(mapper.GetOrganizationCode(defaultValueProvider.OrganizationNameSampleCollection), organization.OrganizationCode);
            Assert.AreEqual(defaultValueProvider.OrganizationNameSampleCollection, organization.OrganizationName);
        }