コード例 #1
0
        public void ConvertTo_ValidAssembly()
        {
            var converter = new AssemblyNameConverter();
            var asm       = typeof(String).Assembly;

            Assert.AreEqual(asm.FullName, converter.ConvertTo(asm, null), "An assembly value should convert to the full assembly name.");
        }
コード例 #2
0
        public void ConvertTo_NullAssembly()
        {
            var converter = new AssemblyNameConverter();

            Assert.IsNull(converter.ConvertTo(null, null), "A null value should convert to a null assembly.");
        }
コード例 #3
0
        public void ConvertTo_NotAssembly()
        {
            var converter = new AssemblyNameConverter();

            Assert.Throws <ArgumentException>(() => converter.ConvertTo(5, null));
        }