Beispiel #1
0
        public void ShouldThrowExceptionInUnitsIfUnitsNotHomogenous()
        {
            var measurementList = new System.Collections.Generic.List <IMeasurement>()
            {
                new Measurement(1, "Hz"),
                new Measurement(1, "notHz")
            };

            Assert.Throws(typeof(MeasurementIncompatibilityException),
                          () => measurementList.BaseUnits()
                          );
        }
        public void ShouldThrowExceptionInUnitsIfUnitsNotHomogenous()
        {
            var measurementList = new System.Collections.Generic.List<IMeasurement>()
                                      {
                                          new Measurement(1, "Hz"),
                                          new Measurement(1, "notHz")
                                      };

            Assert.Throws(typeof(MeasurementIncompatibilityException),
                          () => measurementList.BaseUnits()
                );
        }