Ejemplo n.º 1
0
 private static void CheckGenericType <T>(string name, List <T> list)
 {
     Console.WriteLine(name + " type is " + typeof(T));
     Console.WriteLine(ListLibrary.IsNumber <T>());
 }
        public void IsNumber_Decimal_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <decimal>();

            Assert.IsTrue(result);
        }
        public void IsNumber_Bool_ReturnsFalse()
        {
            bool result = ListLibrary.IsNumber <bool>();

            Assert.IsFalse(result);
        }
        public void IsNumber_Float_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <float>();

            Assert.IsTrue(result);
        }
        public void IsNumber_Double_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <double>();

            Assert.IsTrue(result);
        }
        public void IsNumber_ULong_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <ulong>();

            Assert.IsTrue(result);
        }
        public void IsNumber_UInt_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <uint>();

            Assert.IsTrue(result);
        }
        public void IsNumber_Short_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <short>();

            Assert.IsTrue(result);
        }
        public void IsNumber_Byte_ReturnsTrue()
        {
            bool result = ListLibrary.IsNumber <byte>();

            Assert.IsTrue(result);
        }
        public void IsNumber_Char_ReturnsFalse()
        {
            bool result = ListLibrary.IsNumber <char>();

            Assert.IsFalse(result);
        }