Esempio n. 1
0
        private static HydraulicBoundaryLocationCalculation CreateHydraulicBoundaryLocationCalculation(HydraulicLocationCalculationEntity calculationEntity,
                                                                                                       ReadConversionCollector collector)
        {
            var calculation = new HydraulicBoundaryLocationCalculation(collector.Get(calculationEntity.HydraulicLocationEntity));

            calculationEntity.Read(calculation);
            return(calculation);
        }
Esempio n. 2
0
        public void Read_CalculationWithoutOutput_HydraulicBoundaryLocationCalculationWithExpectedValues()
        {
            // Setup
            HydraulicLocationCalculationEntity entity = CreateCalculationEntity(21);

            var calculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation());

            // Call
            entity.Read(calculation);

            // Assert
            AssertHydraulicBoundaryLocationCalculation(entity, calculation);
        }
Esempio n. 3
0
        public void Read_CalculationWithOutputAndIllustrationPoints_HydraulicBoundaryLocationCalculationWithExpectedValues()
        {
            // Setup
            HydraulicLocationCalculationEntity entity = CreateCalculationEntityWithOutputAndGeneralResultEntity(21);

            var calculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation());

            // Call
            entity.Read(calculation);

            // Assert
            AssertHydraulicBoundaryLocationCalculation(entity, calculation);
        }
Esempio n. 4
0
        public void Read_HydraulicBoundaryLocationCalculationNull_ThrowsArgumentNullException()
        {
            // Setup
            var entity = new HydraulicLocationCalculationEntity();

            // Call
            TestDelegate call = () => entity.Read(null);

            // Assert
            var exception = Assert.Throws <ArgumentNullException>(call);

            Assert.AreEqual("calculation", exception.ParamName);
        }