Example #1
0
        public void Factor()
        {
            double factor = 3.1415927;
            var    unit   = new GimpUnit("foo", factor, 3, "%", "abbr", "foo", "foos");

            Assert.AreEqual(factor, unit.Factor);
        }
Example #2
0
 public void Digits()
 {
     int digits = 3;
       var unit = new GimpUnit("foo", 3.1415927, digits, "%", "abbr", "foo",
           "foos");
       Assert.AreEqual(digits, unit.Digits);
 }
Example #3
0
 public void Abbreviation()
 {
     string abbreviation = "abbr";
       var unit = new GimpUnit("foo", 3.1415927, 3, "%", abbreviation, "foo",
           "foos");
       Assert.AreEqual(abbreviation, unit.Abbreviation);
 }
Example #4
0
        public void Plural()
        {
            string plural = "foos";
            var    unit   = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", plural);

            Assert.AreEqual(plural, unit.Plural);
        }
Example #5
0
        public void Singular()
        {
            string singular = "foo";
            var    unit     = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", singular,
                                           "foos");

            Assert.AreEqual(singular, unit.Singular);
        }
Example #6
0
        public void Symbol()
        {
            string symbol = "%";
            var    unit   = new GimpUnit("foo", 3.1415927, 3, symbol, "abbr", "foo",
                                         "foos");

            Assert.AreEqual(symbol, unit.Symbol);
        }
Example #7
0
        public void Identifier()
        {
            string identifier = "foo";
            var    unit       = new GimpUnit(identifier, 3.1415927, 3, "%", "abbr", "foo",
                                             "foos");

            Assert.AreEqual(identifier, unit.Identifier);
        }
Example #8
0
        public void Digits()
        {
            int digits = 3;
            var unit   = new GimpUnit("foo", 3.1415927, digits, "%", "abbr", "foo",
                                      "foos");

            Assert.AreEqual(digits, unit.Digits);
        }
Example #9
0
        public void NewGimpUnit()
        {
            int numberOfUnits = GimpUnit.NumberOfUnits;
            var unit          = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", "foos");

            Assert.AreEqual(numberOfUnits + 1, GimpUnit.NumberOfUnits);
            Assert.AreEqual((int)Unit.End, GimpUnit.NumberOfBuiltInUnits);
        }
Example #10
0
        public void Abbreviation()
        {
            string abbreviation = "abbr";
            var    unit         = new GimpUnit("foo", 3.1415927, 3, "%", abbreviation, "foo",
                                               "foos");

            Assert.AreEqual(abbreviation, unit.Abbreviation);
        }
Example #11
0
 public void DeletionFlag()
 {
     var unit = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", "foos");
       Assert.IsTrue(unit.DeletionFlag);
       unit.DeletionFlag = false;
       Assert.IsFalse(unit.DeletionFlag);
       unit.DeletionFlag = true;
       Assert.IsTrue(unit.DeletionFlag);
 }
Example #12
0
        public void DeletionFlag()
        {
            var unit = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", "foos");

            Assert.IsTrue(unit.DeletionFlag);
            unit.DeletionFlag = false;
            Assert.IsFalse(unit.DeletionFlag);
            unit.DeletionFlag = true;
            Assert.IsTrue(unit.DeletionFlag);
        }
Example #13
0
 public void Factor()
 {
     double factor = 3.1415927;
       var unit = new GimpUnit("foo", factor, 3, "%", "abbr", "foo", "foos");
       Assert.AreEqual(factor, unit.Factor);
 }
Example #14
0
 public void Symbol()
 {
     string symbol = "%";
       var unit = new GimpUnit("foo", 3.1415927, 3, symbol, "abbr", "foo",
           "foos");
       Assert.AreEqual(symbol, unit.Symbol);
 }
Example #15
0
 public void Singular()
 {
     string singular = "foo";
       var unit = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", singular,
           "foos");
       Assert.AreEqual(singular, unit.Singular);
 }
Example #16
0
 public void Identifier()
 {
     string identifier = "foo";
       var unit = new GimpUnit(identifier, 3.1415927, 3, "%", "abbr", "foo",
           "foos");
       Assert.AreEqual(identifier, unit.Identifier);
 }
Example #17
0
 public void NewGimpUnit()
 {
     int numberOfUnits = GimpUnit.NumberOfUnits;
       var unit = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", "foos");
       Assert.AreEqual(numberOfUnits + 1, GimpUnit.NumberOfUnits);
       Assert.AreEqual((int) Unit.End, GimpUnit.NumberOfBuiltInUnits);
 }
Example #18
0
 public void Plural()
 {
     string plural = "foos";
       var unit = new GimpUnit("foo", 3.1415927, 3, "%", "abbr", "foo", plural);
       Assert.AreEqual(plural, unit.Plural);
 }