public void Get_anInformationKnownToFirstLink_dontCallOtherLinksAndReturnTheValue <TObject>(string iName, TObject valueToReturn)
        {
            // arrange:
            List <object>            mocks = new List <object>();
            InstanceName <TObject>   name  = new InstanceName <TObject>(iName);
            EnvironmentChainLinkBase firstMockLink;
            EnvironmentChainLinkBase secondMockLink;
            EnvironmentsChain        underTest = CreateNewEnvironmentChainToTest(out firstMockLink, out secondMockLink);

            mocks.Add(firstMockLink);
            mocks.Add(secondMockLink);
            TObject varPlaceHolder;

            firstMockLink.Expect(l => l.TryGet <TObject>(name, out varPlaceHolder)).Return(true).OutRef(valueToReturn).Repeat.Once();
            TObject objectProvided;

            // act:
            objectProvided = underTest.Get <TObject>(name);

            // assert:
            Assert.AreEqual(valueToReturn, objectProvided);
            foreach (object mock in mocks)
            {
                mock.VerifyAllExpectations();
            }
        }
        public void Get_unknownInformation_throwsKeyNotFoundException <TObject>(string iName, TObject dummyObject)
        {
            // arrange:
            List <object>            mocks = new List <object>();
            InstanceName <TObject>   name  = new InstanceName <TObject>(iName);
            EnvironmentChainLinkBase firstMockLink;
            EnvironmentChainLinkBase secondMockLink;
            EnvironmentsChain        underTest = CreateNewEnvironmentChainToTest(out firstMockLink, out secondMockLink);

            mocks.Add(firstMockLink);
            mocks.Add(secondMockLink);
            TObject varPlaceHolder;

            firstMockLink.Expect(l => l.TryGet <TObject>(name, out varPlaceHolder)).Return(false).Repeat.Once();
            secondMockLink.Expect(l => l.TryGet <TObject>(name, out varPlaceHolder)).Return(false).Repeat.Once();

            // assert:
            Assert.Throws <KeyNotFoundException>(delegate { underTest.Get <TObject>(name); });
            foreach (object mock in mocks)
            {
                mock.VerifyAllExpectations();
            }
        }