Beispiel #1
0
        protected override void Context()
        {
            sut = new MoBiDimensionFactory();

            _drugMassDimension = new Dimension(new BaseDimensionRepresentation(), "DrugMass", "g");
            _volumeDimension   = new Dimension(new BaseDimensionRepresentation {
                MassExponent = 3
            }, "Volume", "l");
            _flowDimension = new Dimension(new BaseDimensionRepresentation {
                MassExponent = 3, TimeExponent = -1
            }, "flow", "l/min");

            sut.AddDimension(_drugMassDimension);
            sut.AddDimension(_volumeDimension);
            sut.AddDimension(_flowDimension);
        }
Beispiel #2
0
        private static IMoBiDimensionFactory generateFactory()
        {
            var factory = new MoBiDimensionFactory();

            var massDimension = new Dimension(new BaseDimensionRepresentation(), DimensionNames.Mass, "g");

            massDimension.AddUnit(new Unit("kg", 1000, 0));
            massDimension.AddUnit(new Unit("mg", 0.001, 0));

            var concentrationDimension = new Dimension(new BaseDimensionRepresentation(), DimensionNames.Concentration, "mol");

            factory.AddDimension(massDimension);
            factory.AddDimension(concentrationDimension);
            factory.AddDimension(new Dimension(new BaseDimensionRepresentation(), DimensionNames.Time, "s"));

            return(factory);
        }
Beispiel #3
0
        protected override void Context()
        {
            sut = new MoBiDimensionFactory();

            _drugMassDimension = new Dimension(new BaseDimensionRepresentation(), "DrugMass", "g");
            _volumeDimension   = new Dimension(new BaseDimensionRepresentation {
                MassExponent = 3
            }, "Volume", "l");
            _anotherDimensionThatLooksLikeVolumeWithADifferentUnit = new Dimension(new BaseDimensionRepresentation {
                MassExponent = 3, TimeExponent = -1
            }, "01_OTHER", "");
            _flowDimension = new Dimension(new BaseDimensionRepresentation {
                MassExponent = 3, TimeExponent = -1
            }, "flow", "l/min");
            _timeDimension = new Dimension(new BaseDimensionRepresentation {
                TimeExponent = 1
            }, "Time", "min");
            _inversedTimeDimension = new Dimension(new BaseDimensionRepresentation {
                TimeExponent = -1
            }, "InversedTime", "1/min");

            sut.AddDimension(_drugMassDimension);
            sut.AddDimension(_volumeDimension);
            sut.AddDimension(_flowDimension);
            sut.AddDimension(_anotherDimensionThatLooksLikeVolumeWithADifferentUnit);
            sut.AddDimension(_timeDimension);
            sut.AddDimension(_inversedTimeDimension);
            sut.AddDimension(Constants.Dimension.NO_DIMENSION);
        }