예제 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Arabic != null ? Arabic.GetHashCode() : 0) * 397) ^ (English != null ? English.GetHashCode() : 0));
     }
 }
예제 #2
0
        public void TestRomenConversion_1024()
        {
            var arabic   = new Arabic(1024);
            var expected = "MXXIV";

            Assert.AreEqual(expected, arabic.ToRoman());
        }
예제 #3
0
        private void convertBTN_Click(object sender, EventArgs e)
        {
            string Arabic;

            Arabic           = ArabicToRoman.ArabicConverter(int.Parse(inArabicNumTB.Text));
            outArabicLB.Text = Arabic.ToString();
        }
예제 #4
0
        public void TestRomenConversion_59()
        {
            var arabic   = new Arabic(59);
            var expected = "LIX";

            Assert.AreEqual(expected, arabic.ToRoman());
        }
예제 #5
0
        public void TestRomenConversion_48()
        {
            var arabic   = new Arabic(48);
            var expected = "XLVIII";

            Assert.AreEqual(expected, arabic.ToRoman());
        }
예제 #6
0
        public void TestRomenConversion_6()
        {
            var arabic   = new Arabic(6);
            var expected = "VI";

            Assert.AreEqual(expected, arabic.ToRoman());
        }
예제 #7
0
        public void Arabic_WhenCantConvertValue_ShouldRiseAnException()
        {
            // Arrange
            Arabic arabic = new Arabic();
            //Act
            Action actual = () => arabic.ConvertToRoman(0, _roman);

            //Assert
            Assert.Throws <ArgumentException>(actual);
        }
예제 #8
0
        public void Arabic_WhenConvertIntegerValue_ShouldReturnRomanString(string expected, int value)
        {
            // Arrange
            Arabic arabic = new Arabic();
            //Act
            string actual = arabic.ConvertToRoman(value, _roman);

            //Assert
            Assert.Equal(expected, actual);
        }
예제 #9
0
 public async Task AddQuote(Arabic item)
 {
     try
     {
         await _context.Arabic.InsertOneAsync(item);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #10
0
        public override bool Equals(object obj)
        {
            if (obj == null || obj.GetType() != GetType())
            {
                return(false);
            }

            LocalizedString other = (LocalizedString)obj;

            return(Arabic.Equals(other.Arabic) && English.Trim().ToLower().Equals(other.English.Trim().ToLower()));
        }
예제 #11
0
        public List <string> ToLowerTrimmedStrings()
        {
            var ret = new List <string>();

            if (English != null)
            {
                ret.Add(English.Trim().ToLower());
            }
            if (French != null)
            {
                ret.Add(French.Trim().ToLower());
            }
            if (Arabic != null)
            {
                ret.Add(Arabic.Trim().ToLower());
            }

            return(ret);
        }
예제 #12
0
 public ActionResult Create(ArabicVM model)
 {
     try
     {
         // TODO: Add insert logic here
         if (model.Quote != null)
         {
             //save the image
             //_blobStorageServices = new BlobStorageServices();
             //model.imageUrl = ImageUpload(model.image);
             model.imageUrl = "https://i5.walmartimages.ca/images/Large/428/5_r/6000195494285_R.jpg";
             //call the API Post
             Arabic arabic = new Arabic()
             {
                 imageName = model.imageName,
                 imageUrl  = model.imageUrl,
                 Quote     = model.Quote
             };
             using (var client = new HttpClient())
             {
                 client.BaseAddress = new Uri("http://localhost:61878/api/arabicquotes");
                 using (var postTask = client.PostAsJsonAsync <Arabic>("arabicquotes", arabic))
                 {
                     postTask.Wait();
                     var result = postTask.Result;
                     if (result.IsSuccessStatusCode)
                     {
                         return(RedirectToAction("Index"));
                     }
                 }
             }
         }
         return(View(model));
     }
     catch (Exception ex)
     {
         //ViewBag.Exception = ex.Message;
         //return View(model);
         throw ex;
     }
 }
예제 #13
0
        public void TestCategory()
        {
            Assert.AreEqual(Arabic.NegateCategory().Expression, NonArabic.Expression);
            Assert.AreEqual(NonBasicLatin.NegateCategory().Expression, BasicLatin.Expression);
            Assert.AreEqual(BasicLatin.Intersect(NonLowercaseLetter).Expression, @"(?=\p{IsBasicLatin})\P{Ll}");
            Assert.AreEqual(BasicLatin.UnionAndIntersect(Arabic, NonLowercaseLetter).Expression, @"(?=\p{IsBasicLatin}|\p{IsArabic})\P{Ll}");
            var x = BasicLatin - LowercaseLetter;

            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}-[\p{Ll}]]");
            Assert.AreEqual((MathSymbol - x).Expression, @"[\p{Sm}-[\p{IsBasicLatin}-[\p{Ll}]]]");
            Assert.AreEqual((x - ('H', 'K')).Expression, @"[\p{IsBasicLatin}-[\p{Ll}H-K]]");
            Assert.AreEqual((x - 'H').Expression, @"[\p{IsBasicLatin}-[\p{Ll}H]]");
            x = BasicLatin - (LowercaseLetter - 'a');
            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}-[\p{Ll}-[a]]]");
            x = (BasicLatin - LowercaseLetter) - 'a';
            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}-[\p{Ll}a]]");

            x = BasicLatin & LowercaseLetter;
            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}\p{Ll}]");
            Assert.AreEqual((MathSymbol & x).Expression, @"[\p{Sm}\p{IsBasicLatin}\p{Ll}]");
            Assert.AreEqual((BasicLatin & ('H', 'K')).Expression, @"[\p{IsBasicLatin}H-K]");
            Assert.AreEqual((Arabic & 'H').Expression, @"[\p{IsArabic}H]");
            x = BasicLatin & (LowercaseLetter - 'a');
            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}\p{Ll}-[a]]");
            x = (BasicLatin & LowercaseLetter) - 'a';
            Assert.AreEqual(x.Expression, @"[\p{IsBasicLatin}\p{Ll}-[a]]");
            Assert.AreEqual((Arabic & new CharClassPattern(false, 'b')).Expression, @"[\p{IsArabic}b]");
            Assert.AreEqual((Arabic & ('a', 'z')).Expression, @"[\p{IsArabic}a-z]");

            var p = BasicLatin + LowercaseLetter;

            Assert.AreEqual(p.Expression, @"\p{IsBasicLatin}\p{Ll}");
            Assert.AreEqual((MathSymbol + p).Expression, @"\p{Sm}\p{IsBasicLatin}\p{Ll}");
            p = BasicLatin + (LowercaseLetter - 'a');
            Assert.AreEqual(p.Expression, @"\p{IsBasicLatin}[\p{Ll}-[a]]");
            Assert.AreEqual((Arabic + new CharClassPattern(false, 'b')).Expression, @"\p{IsArabic}[b]");
            Assert.AreEqual((Arabic + ('a', 'z')).Expression, @"\p{IsArabic}[a-z]");
        }
 void ConvertCommandExecute()
 {
     if (FirstValue.Trim() == null)
     {
         MessageBox.Show("You must enter a value.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         if (FirstLabel == "Arabic")
         {
             int number = 0;
             try
             {
                 number = int.Parse(FirstValue.Trim());
                 if (number < 1)
                 {
                     MessageBox.Show("You can not enter a negative value", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                 }
                 else
                 {
                     arabic      = new Arabic(FirstValue);
                     SecondValue = arabic.ConvertToRoman(number);
                 }
             }
             catch (Exception)
             {
                 MessageBox.Show("You did not enter an arabic number, try again.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
         else if (FirstLabel == "Roman")
         {
             String number = FirstValue.Trim();
             roman       = new Roman(FirstValue);
             SecondValue = roman.ConvertToArabic();
         }
     }
 }
예제 #15
0
 public bool Contains(string value)
 {
     value = value.Trim().ToLower();
     return(value == English.Trim().ToLower() || value == French.Trim().ToLower() || value == Arabic.Trim().ToLower());
 }
예제 #16
0
        public async Task <IActionResult> Post([FromBody] Arabic value)
        {
            await _arabicQManager.AddQuote(value);

            return(Ok());
        }
예제 #17
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string Hexdecimal;
                string Bin;
                string Arabic;
                int    Roman;
                string Roman2Bin;
                string Bin2Roman;
                string Ara2Hex;
                string Hex2Ara;
                string Ara2Bin;
                string Bin2Ara;
                string Hex2Roman;
                string Roman2Hex;

                if (numericTypeEntryCB.SelectedItem.Equals("Roman Numerals") &&
                    numericTypeResultCB.SelectedItem.Equals("Arabic"))

                {
                    Roman             = Roman_Arabic.RomanToArabic(numberTB.Text);
                    resultOutput.Text = Roman.ToString();
                }


                else if (numericTypeEntryCB.SelectedItem.Equals("Arabic") &&
                         numericTypeResultCB.SelectedItem.Equals("Roman Numerals"))

                {
                    Arabic            = Arabic_Roman.ArabicToRoman(int.Parse(numberTB.Text));
                    resultOutput.Text = Arabic.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Binary") &&
                         numericTypeResultCB.SelectedItem.Equals("Hexadecimal"))
                {
                    Bin = Bin_Hex.BinaryToHexadecimal((numberTB.Text));
                    resultOutput.Text = Bin.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Hexadecimal") &&
                         numericTypeResultCB.SelectedItem.Equals("Binary"))
                {
                    Hexdecimal        = Hex_Bin.HexadecimalToBinary((numberTB.Text));
                    resultOutput.Text = Hexdecimal.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Roman Numerals") &&
                         numericTypeResultCB.SelectedItem.Equals("Binary"))
                {
                    Roman2Bin         = Roman_Bin.RomanToBinary((numberTB.Text));
                    resultOutput.Text = Roman2Bin.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Binary") &&
                         numericTypeResultCB.SelectedItem.Equals("Roman Numerals"))
                {
                    Bin2Roman         = Bin_Roman.BinaryToRoman(int.Parse(numberTB.Text));
                    resultOutput.Text = Bin2Roman.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Arabic") &&
                         numericTypeResultCB.SelectedItem.Equals("Hexadecimal"))
                {
                    Ara2Hex           = Arabic_Hex.ArabicToHexadecimal((numberTB.Text));
                    resultOutput.Text = Ara2Hex.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Hexadecimal") &&
                         numericTypeResultCB.SelectedItem.Equals("Arabic"))
                {
                    Hex2Ara           = Hex_Arabic.HexadecimalToArabic((numberTB.Text));
                    resultOutput.Text = Hex2Ara.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Arabic") &&
                         numericTypeResultCB.SelectedItem.Equals("Binary"))
                {
                    Ara2Bin           = Arabic_Bin.ArabicToBinary((int.Parse(numberTB.Text)));
                    resultOutput.Text = Ara2Bin.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Binary") &&
                         numericTypeResultCB.SelectedItem.Equals("Arabic"))
                {
                    Bin2Ara           = Bin_Arabic.BinaryToArabic((numberTB.Text));
                    resultOutput.Text = Bin2Ara.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Hexadecimal") &&
                         numericTypeResultCB.SelectedItem.Equals("Roman Numerals"))
                {
                    Hex2Roman         = Hex_Roman.HexToRoman((numberTB.Text));
                    resultOutput.Text = Hex2Roman.ToString();
                }

                else if (numericTypeEntryCB.SelectedItem.Equals("Roman Numerals") &&
                         numericTypeResultCB.SelectedItem.Equals("Hexadecimal"))
                {
                    Roman2Hex         = Roman_Hex.RomanToHexadecimal((numberTB.Text));
                    resultOutput.Text = Roman2Hex.ToUpper();
                }

                else if (numericTypeEntryCB.SelectedItem == numericTypeResultCB.SelectedItem)
                {
                    resultOutput.Text = numberTB.Text;
                }

                else
                {
                    MessageBox.Show("You messed up dude.");
                };
            }

            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
예제 #18
0
 public void TestPositiveCategories()
 {
     Assert.AreEqual(UppercaseLetter.ToString(), UnicodeCategory(Categories.UppercaseLetter).ToString());
     Assert.AreEqual(LowercaseLetter.ToString(), UnicodeCategory(Categories.LowercaseLetter).ToString());
     Assert.AreEqual(TitlecaseLetter.ToString(), UnicodeCategory(Categories.TitlecaseLetter).ToString());
     Assert.AreEqual(ModifierLetter.ToString(), UnicodeCategory(Categories.ModifierLetter).ToString());
     Assert.AreEqual(OtherLetter.ToString(), UnicodeCategory(Categories.OtherLetter).ToString());
     Assert.AreEqual(Letter.ToString(), UnicodeCategory(Categories.Letter).ToString());
     Assert.AreEqual(NonspacingMark.ToString(), UnicodeCategory(Categories.NonspacingMark).ToString());
     Assert.AreEqual(SpacingCombiningMark.ToString(), UnicodeCategory(Categories.SpacingCombiningMark).ToString());
     Assert.AreEqual(EnclosingMark.ToString(), UnicodeCategory(Categories.EnclosingMark).ToString());
     Assert.AreEqual(Mark.ToString(), UnicodeCategory(Categories.Mark).ToString());
     Assert.AreEqual(DecimalDigitNumber.ToString(), UnicodeCategory(Categories.DecimalDigitNumber).ToString());
     Assert.AreEqual(LetterNumber.ToString(), UnicodeCategory(Categories.LetterNumber).ToString());
     Assert.AreEqual(OtherNumber.ToString(), UnicodeCategory(Categories.OtherNumber).ToString());
     Assert.AreEqual(Number.ToString(), UnicodeCategory(Categories.Number).ToString());
     Assert.AreEqual(ConnectorPunctuation.ToString(), UnicodeCategory(Categories.ConnectorPunctuation).ToString());
     Assert.AreEqual(DashPunctuation.ToString(), UnicodeCategory(Categories.DashPunctuation).ToString());
     Assert.AreEqual(OpenPunctuation.ToString(), UnicodeCategory(Categories.OpenPunctuation).ToString());
     Assert.AreEqual(ClosePunctuation.ToString(), UnicodeCategory(Categories.ClosePunctuation).ToString());
     Assert.AreEqual(InitialquotePunctuation.ToString(), UnicodeCategory(Categories.InitialquotePunctuation).ToString());
     Assert.AreEqual(FinalquotePunctuation.ToString(), UnicodeCategory(Categories.FinalquotePunctuation).ToString());
     Assert.AreEqual(OtherPunctuation.ToString(), UnicodeCategory(Categories.OtherPunctuation).ToString());
     Assert.AreEqual(Punctuation.ToString(), UnicodeCategory(Categories.Punctuation).ToString());
     Assert.AreEqual(MathSymbol.ToString(), UnicodeCategory(Categories.MathSymbol).ToString());
     Assert.AreEqual(CurrencySymbol.ToString(), UnicodeCategory(Categories.CurrencySymbol).ToString());
     Assert.AreEqual(ModifierSymbol.ToString(), UnicodeCategory(Categories.ModifierSymbol).ToString());
     Assert.AreEqual(OtherSymbol.ToString(), UnicodeCategory(Categories.OtherSymbol).ToString());
     Assert.AreEqual(Patterns.Unicode.Symbol.ToString(), UnicodeCategory(Categories.Symbol).ToString());
     Assert.AreEqual(SpaceSeparator.ToString(), UnicodeCategory(Categories.SpaceSeparator).ToString());
     Assert.AreEqual(LineSeparator.ToString(), UnicodeCategory(Categories.LineSeparator).ToString());
     Assert.AreEqual(ParagraphSeparator.ToString(), UnicodeCategory(Categories.ParagraphSeparator).ToString());
     Assert.AreEqual(Separator.ToString(), UnicodeCategory(Categories.Separator).ToString());
     Assert.AreEqual(Format.ToString(), UnicodeCategory(Categories.Format).ToString());
     Assert.AreEqual(Surrogate.ToString(), UnicodeCategory(Categories.Surrogate).ToString());
     Assert.AreEqual(PrivateUse.ToString(), UnicodeCategory(Categories.PrivateUse).ToString());
     Assert.AreEqual(NotAssigned.ToString(), UnicodeCategory(Categories.NotAssigned).ToString());
     Assert.AreEqual(OtherControl.ToString(), UnicodeCategory(Categories.OtherControl).ToString());
     Assert.AreEqual(Control.ToString(), UnicodeCategory(Categories.Control).ToString());
     Assert.AreEqual(BasicLatin.ToString(), UnicodeCategory(Categories.BasicLatin).ToString());
     Assert.AreEqual(Latin_1Supplement.ToString(), UnicodeCategory(Categories.Latin_1Supplement).ToString());
     Assert.AreEqual(LatinExtended_A.ToString(), UnicodeCategory(Categories.LatinExtended_A).ToString());
     Assert.AreEqual(LatinExtended_B.ToString(), UnicodeCategory(Categories.LatinExtended_B).ToString());
     Assert.AreEqual(IPAExtensions.ToString(), UnicodeCategory(Categories.IPAExtensions).ToString());
     Assert.AreEqual(SpacingModifierLetters.ToString(), UnicodeCategory(Categories.SpacingModifierLetters).ToString());
     Assert.AreEqual(CombiningDiacriticalMarks.ToString(), UnicodeCategory(Categories.CombiningDiacriticalMarks).ToString());
     Assert.AreEqual(Greek.ToString(), UnicodeCategory(Categories.Greek).ToString());
     Assert.AreEqual(GreekandCoptic.ToString(), UnicodeCategory(Categories.GreekandCoptic).ToString());
     Assert.AreEqual(Cyrillic.ToString(), UnicodeCategory(Categories.Cyrillic).ToString());
     Assert.AreEqual(CyrillicSupplement.ToString(), UnicodeCategory(Categories.CyrillicSupplement).ToString());
     Assert.AreEqual(Armenian.ToString(), UnicodeCategory(Categories.Armenian).ToString());
     Assert.AreEqual(Hebrew.ToString(), UnicodeCategory(Categories.Hebrew).ToString());
     Assert.AreEqual(Arabic.ToString(), UnicodeCategory(Categories.Arabic).ToString());
     Assert.AreEqual(Syriac.ToString(), UnicodeCategory(Categories.Syriac).ToString());
     Assert.AreEqual(Thaana.ToString(), UnicodeCategory(Categories.Thaana).ToString());
     Assert.AreEqual(Devanagari.ToString(), UnicodeCategory(Categories.Devanagari).ToString());
     Assert.AreEqual(Bengali.ToString(), UnicodeCategory(Categories.Bengali).ToString());
     Assert.AreEqual(Gurmukhi.ToString(), UnicodeCategory(Categories.Gurmukhi).ToString());
     Assert.AreEqual(Gujarati.ToString(), UnicodeCategory(Categories.Gujarati).ToString());
     Assert.AreEqual(Oriya.ToString(), UnicodeCategory(Categories.Oriya).ToString());
     Assert.AreEqual(Tamil.ToString(), UnicodeCategory(Categories.Tamil).ToString());
     Assert.AreEqual(Telugu.ToString(), UnicodeCategory(Categories.Telugu).ToString());
     Assert.AreEqual(Kannada.ToString(), UnicodeCategory(Categories.Kannada).ToString());
     Assert.AreEqual(Malayalam.ToString(), UnicodeCategory(Categories.Malayalam).ToString());
     Assert.AreEqual(Sinhala.ToString(), UnicodeCategory(Categories.Sinhala).ToString());
     Assert.AreEqual(Thai.ToString(), UnicodeCategory(Categories.Thai).ToString());
     Assert.AreEqual(Lao.ToString(), UnicodeCategory(Categories.Lao).ToString());
     Assert.AreEqual(Tibetan.ToString(), UnicodeCategory(Categories.Tibetan).ToString());
     Assert.AreEqual(Myanmar.ToString(), UnicodeCategory(Categories.Myanmar).ToString());
     Assert.AreEqual(Georgian.ToString(), UnicodeCategory(Categories.Georgian).ToString());
     Assert.AreEqual(HangulJamo.ToString(), UnicodeCategory(Categories.HangulJamo).ToString());
     Assert.AreEqual(Ethiopic.ToString(), UnicodeCategory(Categories.Ethiopic).ToString());
     Assert.AreEqual(Cherokee.ToString(), UnicodeCategory(Categories.Cherokee).ToString());
     Assert.AreEqual(UnifiedCanadianAboriginalSyllabics.ToString(), UnicodeCategory(Categories.UnifiedCanadianAboriginalSyllabics).ToString());
     Assert.AreEqual(Ogham.ToString(), UnicodeCategory(Categories.Ogham).ToString());
     Assert.AreEqual(Runic.ToString(), UnicodeCategory(Categories.Runic).ToString());
     Assert.AreEqual(Tagalog.ToString(), UnicodeCategory(Categories.Tagalog).ToString());
     Assert.AreEqual(Hanunoo.ToString(), UnicodeCategory(Categories.Hanunoo).ToString());
     Assert.AreEqual(Buhid.ToString(), UnicodeCategory(Categories.Buhid).ToString());
     Assert.AreEqual(Tagbanwa.ToString(), UnicodeCategory(Categories.Tagbanwa).ToString());
     Assert.AreEqual(Khmer.ToString(), UnicodeCategory(Categories.Khmer).ToString());
     Assert.AreEqual(Mongolian.ToString(), UnicodeCategory(Categories.Mongolian).ToString());
     Assert.AreEqual(Limbu.ToString(), UnicodeCategory(Categories.Limbu).ToString());
     Assert.AreEqual(TaiLe.ToString(), UnicodeCategory(Categories.TaiLe).ToString());
     Assert.AreEqual(KhmerSymbols.ToString(), UnicodeCategory(Categories.KhmerSymbols).ToString());
     Assert.AreEqual(PhoneticExtensions.ToString(), UnicodeCategory(Categories.PhoneticExtensions).ToString());
     Assert.AreEqual(LatinExtendedAdditional.ToString(), UnicodeCategory(Categories.LatinExtendedAdditional).ToString());
     Assert.AreEqual(GreekExtended.ToString(), UnicodeCategory(Categories.GreekExtended).ToString());
     Assert.AreEqual(GeneralPunctuation.ToString(), UnicodeCategory(Categories.GeneralPunctuation).ToString());
     Assert.AreEqual(SuperscriptsandSubscripts.ToString(), UnicodeCategory(Categories.SuperscriptsandSubscripts).ToString());
     Assert.AreEqual(CurrencySymbols.ToString(), UnicodeCategory(Categories.CurrencySymbols).ToString());
     Assert.AreEqual(CombiningDiacriticalMarksforSymbols.ToString(), UnicodeCategory(Categories.CombiningDiacriticalMarksforSymbols).ToString());
     Assert.AreEqual(CombiningMarksforSymbols.ToString(), UnicodeCategory(Categories.CombiningMarksforSymbols).ToString());
     Assert.AreEqual(LetterlikeSymbols.ToString(), UnicodeCategory(Categories.LetterlikeSymbols).ToString());
     Assert.AreEqual(NumberForms.ToString(), UnicodeCategory(Categories.NumberForms).ToString());
     Assert.AreEqual(Arrows.ToString(), UnicodeCategory(Categories.Arrows).ToString());
     Assert.AreEqual(MathematicalOperators.ToString(), UnicodeCategory(Categories.MathematicalOperators).ToString());
     Assert.AreEqual(MiscellaneousTechnical.ToString(), UnicodeCategory(Categories.MiscellaneousTechnical).ToString());
     Assert.AreEqual(ControlPictures.ToString(), UnicodeCategory(Categories.ControlPictures).ToString());
     Assert.AreEqual(OpticalCharacterRecognition.ToString(), UnicodeCategory(Categories.OpticalCharacterRecognition).ToString());
     Assert.AreEqual(EnclosedAlphanumerics.ToString(), UnicodeCategory(Categories.EnclosedAlphanumerics).ToString());
     Assert.AreEqual(BoxDrawing.ToString(), UnicodeCategory(Categories.BoxDrawing).ToString());
     Assert.AreEqual(BlockElements.ToString(), UnicodeCategory(Categories.BlockElements).ToString());
     Assert.AreEqual(GeometricShapes.ToString(), UnicodeCategory(Categories.GeometricShapes).ToString());
     Assert.AreEqual(MiscellaneousSymbols.ToString(), UnicodeCategory(Categories.MiscellaneousSymbols).ToString());
     Assert.AreEqual(Dingbats.ToString(), UnicodeCategory(Categories.Dingbats).ToString());
     Assert.AreEqual(MiscellaneousMathematicalSymbols_A.ToString(), UnicodeCategory(Categories.MiscellaneousMathematicalSymbols_A).ToString());
     Assert.AreEqual(SupplementalArrows_A.ToString(), UnicodeCategory(Categories.SupplementalArrows_A).ToString());
     Assert.AreEqual(BraillePatterns.ToString(), UnicodeCategory(Categories.BraillePatterns).ToString());
     Assert.AreEqual(SupplementalArrows_B.ToString(), UnicodeCategory(Categories.SupplementalArrows_B).ToString());
     Assert.AreEqual(MiscellaneousMathematicalSymbols_B.ToString(), UnicodeCategory(Categories.MiscellaneousMathematicalSymbols_B).ToString());
     Assert.AreEqual(SupplementalMathematicalOperators.ToString(), UnicodeCategory(Categories.SupplementalMathematicalOperators).ToString());
     Assert.AreEqual(MiscellaneousSymbolsandArrows.ToString(), UnicodeCategory(Categories.MiscellaneousSymbolsandArrows).ToString());
     Assert.AreEqual(CJKRadicalsSupplement.ToString(), UnicodeCategory(Categories.CJKRadicalsSupplement).ToString());
     Assert.AreEqual(KangxiRadicals.ToString(), UnicodeCategory(Categories.KangxiRadicals).ToString());
     Assert.AreEqual(IdeographicDescriptionCharacters.ToString(), UnicodeCategory(Categories.IdeographicDescriptionCharacters).ToString());
     Assert.AreEqual(CJKSymbolsandPunctuation.ToString(), UnicodeCategory(Categories.CJKSymbolsandPunctuation).ToString());
     Assert.AreEqual(Hiragana.ToString(), UnicodeCategory(Categories.Hiragana).ToString());
     Assert.AreEqual(Katakana.ToString(), UnicodeCategory(Categories.Katakana).ToString());
     Assert.AreEqual(Bopomofo.ToString(), UnicodeCategory(Categories.Bopomofo).ToString());
     Assert.AreEqual(HangulCompatibilityJamo.ToString(), UnicodeCategory(Categories.HangulCompatibilityJamo).ToString());
     Assert.AreEqual(Kanbun.ToString(), UnicodeCategory(Categories.Kanbun).ToString());
     Assert.AreEqual(BopomofoExtended.ToString(), UnicodeCategory(Categories.BopomofoExtended).ToString());
     Assert.AreEqual(KatakanaPhoneticExtensions.ToString(), UnicodeCategory(Categories.KatakanaPhoneticExtensions).ToString());
     Assert.AreEqual(EnclosedCJKLettersandMonths.ToString(), UnicodeCategory(Categories.EnclosedCJKLettersandMonths).ToString());
     Assert.AreEqual(CJKCompatibility.ToString(), UnicodeCategory(Categories.CJKCompatibility).ToString());
     Assert.AreEqual(CJKUnifiedIdeographsExtensionA.ToString(), UnicodeCategory(Categories.CJKUnifiedIdeographsExtensionA).ToString());
     Assert.AreEqual(YijingHexagramSymbols.ToString(), UnicodeCategory(Categories.YijingHexagramSymbols).ToString());
     Assert.AreEqual(CJKUnifiedIdeographs.ToString(), UnicodeCategory(Categories.CJKUnifiedIdeographs).ToString());
     Assert.AreEqual(YiSyllables.ToString(), UnicodeCategory(Categories.YiSyllables).ToString());
     Assert.AreEqual(YiRadicals.ToString(), UnicodeCategory(Categories.YiRadicals).ToString());
     Assert.AreEqual(HangulSyllables.ToString(), UnicodeCategory(Categories.HangulSyllables).ToString());
     Assert.AreEqual(HighSurrogates.ToString(), UnicodeCategory(Categories.HighSurrogates).ToString());
     Assert.AreEqual(HighPrivateUseSurrogates.ToString(), UnicodeCategory(Categories.HighPrivateUseSurrogates).ToString());
     Assert.AreEqual(LowSurrogates.ToString(), UnicodeCategory(Categories.LowSurrogates).ToString());
     Assert.AreEqual(PrivateUseArea.ToString(), UnicodeCategory(Categories.PrivateUseArea).ToString());
     Assert.AreEqual(CJKCompatibilityIdeographs.ToString(), UnicodeCategory(Categories.CJKCompatibilityIdeographs).ToString());
     Assert.AreEqual(LettericPresentationForms.ToString(), UnicodeCategory(Categories.LettericPresentationForms).ToString());
     Assert.AreEqual(ArabicPresentationForms_A.ToString(), UnicodeCategory(Categories.ArabicPresentationForms_A).ToString());
     Assert.AreEqual(VariationSelectors.ToString(), UnicodeCategory(Categories.VariationSelectors).ToString());
     Assert.AreEqual(CombiningHalfMarks.ToString(), UnicodeCategory(Categories.CombiningHalfMarks).ToString());
     Assert.AreEqual(CJKCompatibilityForms.ToString(), UnicodeCategory(Categories.CJKCompatibilityForms).ToString());
     Assert.AreEqual(SmallFormVariants.ToString(), UnicodeCategory(Categories.SmallFormVariants).ToString());
     Assert.AreEqual(ArabicPresentationForms_B.ToString(), UnicodeCategory(Categories.ArabicPresentationForms_B).ToString());
     Assert.AreEqual(HalfwidthandFullwidthForms.ToString(), UnicodeCategory(Categories.HalfwidthandFullwidthForms).ToString());
     Assert.AreEqual(Specials.ToString(), UnicodeCategory(Categories.Specials).ToString());
 }
예제 #19
0
        public void TestRomenConversion3(int number = 3, string expected = "III")
        {
            var arabic = new Arabic(number);

            Assert.AreEqual(expected, arabic.ToRoman());
        }