Exemplo n.º 1
0
        private static TypeRequestPath MapRequestInfoArrayIntoPath(TypeRequestInfo[] typeRequestInfos)
        {
            var result = TypeRequestPath.Root(TestPathName);

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

                Assert.AreEqual(TestPathName, path.Name);
            }
Exemplo n.º 3
0
 public void RootOfThePathCanBeCreatedWithoutTheName()
 {
     Assert.DoesNotThrow(() => TypeRequestPath.Root());
 }
Exemplo n.º 4
0
            public void ReturnsNullForEmpty()
            {
                var path = TypeRequestPath.Root();

                Assert.IsNull(path.LastType);
            }
Exemplo n.º 5
0
            public void ThrowsArgumentNullExceptionForNullTypeRequestInfo()
            {
                var parent = TypeRequestPath.Root();

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