Beispiel #1
0
        public void BranchCode_AEGONL2U_StringEmpty()
        {
            var exp = "";
            var act = BusinessIdentifierCode.Parse("AEGONL2U").Branch;

            Assert.AreEqual(exp, act);
        }
Beispiel #2
0
        public void Equals_FormattedAndUnformatted_IsTrue()
        {
            var l = BusinessIdentifierCode.Parse("AEGONL2UXXX", CultureInfo.InvariantCulture);
            var r = BusinessIdentifierCode.Parse("AEgonL2Uxxx", CultureInfo.InvariantCulture);

            Assert.IsTrue(l.Equals(r));
        }
Beispiel #3
0
 public void Parse_Unknown_AreEqual()
 {
     using (new CultureInfoScope("en-GB"))
     {
         var act = BusinessIdentifierCode.Parse("?");
         var exp = BusinessIdentifierCode.Unknown;
         Assert.AreEqual(exp, act);
     }
 }
Beispiel #4
0
 public void Parse_InvalidInput_ThrowsFormatException()
 {
     using (new CultureInfoScope("en-GB"))
     {
         Assert.Catch <FormatException>
             (() =>
         {
             BusinessIdentifierCode.Parse("InvalidInput");
         },
             "Not a valid BIC");
     }
 }
Beispiel #5
0
        public void OrderByDescending_BusinessIdentifierCode_AreEqual()
        {
            var item0 = BusinessIdentifierCode.Parse("AEGONL2UXXX");
            var item1 = BusinessIdentifierCode.Parse("CEBUNL2U");
            var item2 = BusinessIdentifierCode.Parse("DSSBNL22");
            var item3 = BusinessIdentifierCode.Parse("FTSBNL2R");

            var inp = new List <BusinessIdentifierCode> {
                BusinessIdentifierCode.Empty, item3, item2, item0, item1, BusinessIdentifierCode.Empty
            };
            var exp = new List <BusinessIdentifierCode> {
                item3, item2, item1, item0, BusinessIdentifierCode.Empty, BusinessIdentifierCode.Empty
            };
            var act = inp.OrderByDescending(item => item).ToList();

            CollectionAssert.AreEqual(exp, act);
        }