Exemple #1
0
        public void SimpleReferenceUri()
        {
            var loader = new ReferenceLoader();
            var r = loader.LoadReference(new YamlScalarNode("ref://test/x.dll"));

            r.Should().NotBeNull();
            r.Should().HaveCount(1);
            r[0].Uri.Should().Be(new Uri("ref://test/x.dll"));
            r[0].Type.Should().Be(ReferenceType.Build);
        }
Exemple #2
0
        public void AliasIsSpecialCase()
        {
            var loader = new ReferenceLoader();
            var r = loader.LoadReference(new YamlScalarNode("alias://test"));

            r.Should().NotBeNull();
            r.Should().HaveCount(2);
            r[0].Uri.Should().Be(new Uri("alias://test"));
            r[0].Type.Should().Be(ReferenceType.Build);
            r[1].Uri.Should().Be(new Uri("alias://test"));
            r[1].Type.Should().Be(ReferenceType.Runtime);
        }
Exemple #3
0
        public void ReferenceByUriMappingForm()
        {
            var loader = new ReferenceLoader();
            var r = loader.LoadReference(
                new YamlMappingNode(
                    new[]
                        {
                            new KeyValuePair<YamlNode, YamlNode>(new YamlScalarNode("uri"), new YamlScalarNode("ref://test/x.dll"))
                        }));

            r.Should().NotBeNull();
            r.Should().HaveCount(1);
            r[0].Uri.Should().Be(new Uri("ref://test/x.dll"));
            r[0].Type.Should().Be(ReferenceType.Build);
        }