Beispiel #1
0
        public void GetResourcePath_WithInvalidTypeInVariable()
        {
            _variables.Add("InvalidType", 1);
            var resourceObject = new ResourceObjectWithVarRef(new WxeVariableReference("InvalidType"));

            resourceObject.GetResourcePath(_variables);
        }
Beispiel #2
0
        public void InitializeWithResourceAssembly_WithAssembly()
        {
            var resourceObject = new ResourceObjectWithVarRef(new FakeResourcePathBuilder(), GetType().Assembly, new WxeVariableReference("ThePage"));

            Assert.That(resourceObject.ResourceRoot, Is.EqualTo("/fake/Remotion.Web.UnitTests"));
            Assert.That(resourceObject.PathReference.Name, Is.EqualTo("ThePage"));
        }
Beispiel #3
0
        public void InitializeWithResourceAssembly_WithoutAssembly()
        {
            var resourceObject = new ResourceObjectWithVarRef(new WxeVariableReference("ThePage"));

            Assert.That(resourceObject.ResourceRoot, Is.EqualTo("~/"));
            Assert.That(resourceObject.PathReference.Name, Is.EqualTo("ThePage"));
        }
Beispiel #4
0
        public void GetResourcePath_WithInvalidReference()
        {
            var resourceObject = new ResourceObjectWithVarRef(new WxeVariableReference("InvalidIdentifier"));

            resourceObject.GetResourcePath(_variables);
        }
Beispiel #5
0
        public void GetResourcePath_WithAssembly()
        {
            var resourceObject = new ResourceObjectWithVarRef(new FakeResourcePathBuilder(), GetType().Assembly, new WxeVariableReference("ThePath"));

            Assert.That(resourceObject.GetResourcePath(_variables), Is.EqualTo("/fake/Remotion.Web.UnitTests/path.aspx"));
        }
Beispiel #6
0
        public void GetResourcePath_WithoutAssembly()
        {
            var resourceObject = new ResourceObjectWithVarRef(new WxeVariableReference("ThePath"));

            Assert.That(resourceObject.GetResourcePath(_variables), Is.EqualTo("~/path.aspx"));
        }