private static TypeRequestPath MapRequestInfoArrayIntoPath(TypeRequestInfo[] typeRequestInfos)
        {
            var result = TypeRequestPath.Root(TestPathName);

            foreach (var typeRequestInfo in typeRequestInfos)
            {
                result = TypeRequestPath.Branch(result, typeRequestInfo);
            }
            return(result);
        }
            public void RootOfThePathCanBeCreatedWithName()
            {
                var path = TypeRequestPath.Root(TestPathName);

                Assert.AreEqual(TestPathName, path.Name);
            }
 public void RootOfThePathCanBeCreatedWithoutTheName()
 {
     Assert.DoesNotThrow(() => TypeRequestPath.Root());
 }
            public void ReturnsNullForEmpty()
            {
                var path = TypeRequestPath.Root();

                Assert.IsNull(path.LastType);
            }
            public void ThrowsArgumentNullExceptionForNullTypeRequestInfo()
            {
                var parent = TypeRequestPath.Root();

                ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => TypeRequestPath.Branch(parent, null));
            }