Пример #1
0
        public void describe_GetFullTypeNameFromColumnReference()
        {
            it["given [x, y, z] returns x.y"] = () =>
                                                Names.GetFullTypeNameFromColumnReference(ScriptDomMock.Identifiers("x", "y", "z"))
                                                .Should().Be("x.y");

            it["given [x, y] returns x"] = () =>
                                           Names.GetFullTypeNameFromColumnReference(ScriptDomMock.Identifiers("x", "y"))
                                           .Should().Be("x");
        }
Пример #2
0
        public void describe_GetColumnNameInColumnReference()
        {
            it["given [x, y, z] returns z"] = () =>
                                              Names.GetColumnNameInColumnReference(ScriptDomMock.Identifiers("x", "y", "z"))
                                              .Should().Be("z");

            it["given [x, y] returns y"] = () =>
                                           Names.GetColumnNameInColumnReference(ScriptDomMock.Identifiers("x", "y"))
                                           .Should().Be("y");
        }
Пример #3
0
        public void describe_GetFullTypeName()
        {
            it["Should return a qualified name given a schema object with a schema name and value"] = () =>
                                                                                                      Names.GetFullTypeName(ScriptDomMock.SchemaObjectName("MySchema", "MyObject"))
                                                                                                      .Should().Be("MySchema.MyObject");

            it["Should return a qualified name given a schema object without a schema name"] = () =>
                                                                                               Names.GetFullTypeName(ScriptDomMock.SchemaObjectName("MyObject"))
                                                                                               .Should().Be("MyObject");
        }