public void RegisterAndFindServicesOnTheExplicitArgument() { var args = new ExplicitArguments(); Assert.IsNull(args.Get <IProvider>()); var red = new RedProvider(); args.Set <IProvider>(red); Assert.AreSame(red, args.Get <IProvider>()); args.Set <IExplicitTarget>(new RedTarget()); Assert.IsInstanceOfType(typeof(RedTarget), args.Get <IExplicitTarget>()); }
public void RegisterAndFindServicesOnTheExplicitArgument() { var args = new ExplicitArguments(); args.Get <IProvider>().ShouldBeNull(); var red = new RedProvider(); args.Set <IProvider>(red); red.ShouldBeTheSameAs(args.Get <IProvider>()); args.Set <IExplicitTarget>(new RedTarget()); args.Get <IExplicitTarget>().ShouldBeOfType <RedTarget>(); }
public void RegisterAndFindServicesOnTheExplicitArgument() { var args = new ExplicitArguments(); Assert.IsNull(args.Get<IProvider>()); var red = new RedProvider(); args.Set<IProvider>(red); Assert.AreSame(red, args.Get<IProvider>()); args.Set<IExplicitTarget>(new RedTarget()); args.Get<IExplicitTarget>().ShouldBeOfType<RedTarget>(); }