コード例 #1
0
 public void NegTest1()
 {
     UTF7Encoding utf7 = new UTF7Encoding();
     int byteCount = -1;
     Assert.Throws<ArgumentOutOfRangeException>(() =>
     {
         int maxCharCount = utf7.GetMaxCharCount(byteCount);
     });
 }
コード例 #2
0
        public void NegTest1()
        {
            UTF7Encoding utf7      = new UTF7Encoding();
            int          byteCount = -1;

            Assert.Throws <ArgumentOutOfRangeException>(() =>
            {
                int maxCharCount = utf7.GetMaxCharCount(byteCount);
            });
        }
コード例 #3
0
    public static void Main()
    {
        UTF7Encoding utf7         = new UTF7Encoding();
        int          byteCount    = 8;
        int          maxCharCount = utf7.GetMaxCharCount(byteCount);

        Console.WriteLine(
            "Maximum of {0} characters needed to decode {1} bytes.",
            maxCharCount,
            byteCount
            );
    }
コード例 #4
0
 public void PosTest3()
 {
     int byteCount = Int32.MaxValue;
     UTF7Encoding utf7 = new UTF7Encoding();
     int maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #5
0
 public void PosTest2()
 {
     int byteCount = 0;
     UTF7Encoding utf7 = new UTF7Encoding();
     int maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #6
0
 public void PosTest1()
 {
     int byteCount = _generator.GetInt32(-55);
     UTF7Encoding utf7 = new UTF7Encoding();
     int maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #7
0
 public void PosTest3()
 {
     int          byteCount    = Int32.MaxValue;
     UTF7Encoding utf7         = new UTF7Encoding();
     int          maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #8
0
 public void PosTest2()
 {
     int          byteCount    = 0;
     UTF7Encoding utf7         = new UTF7Encoding();
     int          maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #9
0
 public void PosTest1()
 {
     int          byteCount    = _generator.GetInt32(-55);
     UTF7Encoding utf7         = new UTF7Encoding();
     int          maxCharCount = utf7.GetMaxCharCount(byteCount);
 }
コード例 #10
0
        public void TestMaxCharCount()
        {
            UTF7Encoding UTF7enc = new UTF7Encoding();

            Assert.AreEqual(50, UTF7enc.GetMaxCharCount(50), "UTF #1");
        }