public void ConvertFrom_SimpleAssemblyName()
 {
     var converter = new AssemblyNameConverter();
     var expected = typeof(String).Assembly;
     var actual = converter.ConvertFrom("mscorlib");
     Assert.AreEqual(expected, actual, "The assembly loaded was not the one expected.");
 }
 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.");
 }
 public void ConvertTo_NullAssembly()
 {
     var converter = new AssemblyNameConverter();
     Assert.IsNull(converter.ConvertTo(null, null), "A null value should convert to a null assembly.");
 }
 public void ConvertTo_NotAssembly()
 {
     var converter = new AssemblyNameConverter();
     Assert.Throws<ArgumentException>(() => converter.ConvertTo(5, null));
 }
 public void ConvertFrom_AssemblyNameEmpty(string value)
 {
     var converter = new AssemblyNameConverter();
     Assert.IsNull(converter.ConvertFrom(value), "Empty/null assembly name should result in a null converted value.");
 }