CreateUnresolvedJoinInfo_KitchenCook() public static method

public static CreateUnresolvedJoinInfo_KitchenCook ( ) : UnresolvedJoinInfo
return Remotion.Linq.SqlBackend.SqlStatementModel.Unresolved.UnresolvedJoinInfo
        public void DifferentType()
        {
            var oldJoinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var sqlJoinedTable = new SqlJoinedTable(oldJoinInfo, JoinSemantics.Left);
            var newJoinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenRestaurant();

            sqlJoinedTable.JoinInfo = newJoinInfo;
        }
        public new void ToString()
        {
            var joinedTable = new SqlJoinedTable(SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook(), JoinSemantics.Left);

            var result = joinedTable.ToString();

            Assert.That(result, Is.EqualTo("LEFT JOIN Kitchen.Cook"));
        }
        public void ToString_WithJoins()
        {
            var joinInfo   = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var memberInfo = typeof(Kitchen).GetProperty("Cook");

            _sqlTable.GetOrAddLeftJoin(joinInfo, memberInfo);

            var result = _sqlTable.ToString();

            Assert.That(result, Is.EqualTo("[table1] [t] LEFT JOIN Kitchen.Cook"));
        }
        public void SameType()
        {
            var oldJoinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var sqlJoinedTable = new SqlJoinedTable(oldJoinInfo, JoinSemantics.Left);

            var newJoinInfo = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_CookSubstitution();

            sqlJoinedTable.JoinInfo = newJoinInfo;

            Assert.That(sqlJoinedTable.JoinInfo.ItemType, Is.EqualTo(newJoinInfo.ItemType));
            Assert.That(sqlJoinedTable.JoinSemantics, Is.EqualTo(JoinSemantics.Left));
        }
        public void ToString_WithJoins()
        {
            var joinedTable = new SqlJoinedTable(SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook(), JoinSemantics.Left);
            var joinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var memberInfo  = typeof(Kitchen).GetProperty("Cook");

            joinedTable.GetOrAddLeftJoin(joinInfo, memberInfo);

            var result = joinedTable.ToString();

            Assert.That(result, Is.EqualTo("LEFT JOIN Kitchen.Cook LEFT JOIN Kitchen.Cook"));
        }
        public void Accept_VisitorSupportingExpressionType()
        {
            var oldJoinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var sqlJoinedTable = new SqlJoinedTable(oldJoinInfo, JoinSemantics.Left);

            var visitorMock = MockRepository.GenerateMock <ISqlTableBaseVisitor> ();

            visitorMock.Expect(mock => mock.VisitSqlJoinedTable(sqlJoinedTable));
            visitorMock.Replay();

            sqlJoinedTable.Accept(visitorMock);

            visitorMock.VerifyAllExpectations();
            Assert.That(sqlJoinedTable.JoinSemantics, Is.EqualTo(JoinSemantics.Left));
        }
        public void Accept_ITableInfoVisitor()
        {
            var oldJoinInfo    = SqlStatementModelObjectMother.CreateUnresolvedJoinInfo_KitchenCook();
            var sqlJoinedTable = new SqlJoinedTable(oldJoinInfo, JoinSemantics.Left);
            var fakeResult     = new ResolvedSimpleTableInfo(typeof(Cook), "CookTable", "c");

            var visitorMock = MockRepository.GenerateMock <ITableInfoVisitor>();

            visitorMock
            .Expect(mock => mock.VisitSqlJoinedTable(sqlJoinedTable))
            .Return(fakeResult);

            var result = ((ITableInfo)sqlJoinedTable).Accept(visitorMock);

            visitorMock.VerifyAllExpectations();
            Assert.That(result, Is.SameAs(fakeResult));
        }