public void GetTypeReturnsTypeCorrectTypeAndAssembly()
        {
            Type expected = typeof(RoleEnvironment);
            Type actual   = TypeHelpers.GetLoadedType(expected.ToString(), expected.Assembly.GetName().Name);

            Assert.AreEqual(expected, actual);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RoleInstance"/> class.
 /// </summary>
 /// <param name="targetObject">The target object.</param>
 public RoleInstance(object targetObject)
     : base(TypeHelpers.GetLoadedType("Microsoft.WindowsAzure.ServiceRuntime.RoleInstance", "Microsoft.WindowsAzure.ServiceRuntime"), targetObject)
 {
 }
 public void GetTypeReturnsNullForUnknownAssembly()
 {
     Assert.IsNull(TypeHelpers.GetLoadedType("MyType", "MyAssembly"));
 }
 public void GetTypeReturnsNullForUnknownType()
 {
     Assert.IsNull(TypeHelpers.GetLoadedType("MyType", Assembly.GetExecutingAssembly().GetName().Name));
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoleEnvironment"/> class.
 /// </summary>
 public RoleEnvironment()
     : base(TypeHelpers.GetLoadedType("Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment", "Microsoft.WindowsAzure.ServiceRuntime"))
 {
 }