mercredi 30 septembre 2015

How do i unit test Queryover with selectlist?

How Do I unit Test the below code using A.Fake<> ?

using (session)  
{  
    var result = session.QueryOver<AnnualInformation>()  
                 .JoinAlias(a => a.MonthlyInformation, () => monthlyAlias, JoinType.LeftOuterJoin)  
                 .JoinAlias(a => a.ShareValueInformation, () => shareAlias, JoinType.LeftOuterJoin)  
                 .JoinAlias(a => a.MiscDetails, () => miscAlias, JoinType.LeftOuterJoin)  
                 .SelectList(list => list  
                             .Select(x => x.Id)  
                             .Select(x => x.CreationDate)  
                             .Select(x => x.AnnualAmount)  
                             .Select(x => x.AnnualCurrency)  
                             .Select(() => monthlyAlias.MonthlyAmount)  
                             .Select(() => monthlyAlias.MonthlyCurrency)  
                             .Select(() => shareAlias.CurrentSharevalue)  
                             .Select(() => miscAlias.MarketValueAmount)  
                             ).Where(a => a.Id == 123456).List<object[]>();  
}

Any Ideas Folks with code snippet ?

Aucun commentaire:

Enregistrer un commentaire