Example #1
0
		protected override void Check()
		{
			var x1 = new X1();
			var x2 = new X2();
			var m = new Model();

			m.AddRootComponents(new X3(x1, x2));
			m.Bind(x1.RequiredPorts.M = x2.ProvidedPorts.M);
			m.Seal();

			m.Metadata.Bindings[0].DeclaringComponent.ShouldBe(m.Metadata.RootComponent);
			m.Metadata.Bindings[0].ProvidedPort.ShouldBe(x2.Metadata.ProvidedPorts[0]);
			m.Metadata.Bindings[0].RequiredPort.ShouldBe(x1.Metadata.RequiredPorts[0]);
		}
Example #2
0
		public X3(X1 x1, X2 x2)
		{
			_x1 = x1;
			_x2 = x2;
		}