|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
comparing actual to expected tablesHi All,
does anyone know if there a way to compare actual Itable to expected by only comparing columns specified? that is not check column counts, but specify which columns need to be compared? thanks for any suggestions |
|
|
Re: comparing actual to expected tablesI had a similar requirement.
So I compared queries instead of tables. I limited the queries using the SELECT list to just those fields I wanted to compare. --Erik Ostermueller -----Original Message----- From: dbunit-user-bounces@... [mailto:dbunit-user-bounces@...] On Behalf Of e-zulu Sent: Tuesday, May 20, 2008 11:11 AM To: dbunit-user@... Subject: [dbunit-user] comparing actual to expected tables Hi All, does anyone know if there a way to compare actual Itable to expected by only comparing columns specified? that is not check column counts, but specify which columns need to be compared? thanks for any suggestions -- View this message in context: http://www.nabble.com/comparing-actual-to-expected-tables-tp17344245p173 44245.html Sent from the DBUnit - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user ______________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _____________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
Re: comparing actual to expected tablesUse DefaultColumnFilter class
Example Column groupIdColumn = new Column("GROUP_ID", DataType.VARCHAR); Column[] includedColumns = {groupIdColumn}; ITable expectedTable = expectedFlatDataSet.getTable(tableName); ITable expectedToCompare = DefaultColumnFilter.includedColumnsTable(expectedTable, includedColumns); ITable actualTable = databaseDataSet.getTable(tableName); ITable actualToCompare = DefaultColumnFilter.includedColumnsTable(actualTable, includedColumns); Assertion.assertEquals(expectedToCompare, actualToCompare); -----Original Message----- From: dbunit-user-bounces@... [mailto:dbunit-user-bounces@...] On Behalf Of e-zulu Sent: 20 May 2008 17:11 To: dbunit-user@... Subject: [dbunit-user] comparing actual to expected tables Hi All, does anyone know if there a way to compare actual Itable to expected by only comparing columns specified? that is not check column counts, but specify which columns need to be compared? thanks for any suggestions -- View this message in context: http://www.nabble.com/comparing-actual-to-expected-tables-tp17344245p173 44245.html Sent from the DBUnit - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
|
|
Re: comparing actual to expected tablesyeah, but in my case i have add something to select which i dont' want and cannot compare..
(a system generated date/time) - have to add it in order to select the latest inserted record.. so, for now i am just comparing .getvalue to .getvalue.. which is a pain
|
|
|
Re: comparing actual to expected tables> Date: Tue, 20 May 2008 17:18:20 +0100 > From: steven.hicks@... > To: dbunit-user@... > Subject: Re: [dbunit-user] comparing actual to expected tables > > Use DefaultColumnFilter class > > Example > Column groupIdColumn = new Column("GROUP_ID", DataType.VARCHAR); > Column[] includedColumns = {groupIdColumn}; > > ITable expectedTable = expectedFlatDataSet.getTable(tableName); > ITable expectedToCompare = > DefaultColumnFilter.includedColumnsTable(expectedTable, > includedColumns); > > ITable actualTable = databaseDataSet.getTable(tableName); > ITable actualToCompare = > DefaultColumnFilter.includedColumnsTable(actualTable, includedColumns); > > Assertion.assertEquals(expectedToCompare, actualToCompare); > > -----Original Message----- > From: dbunit-user-bounces@... > [mailto:dbunit-user-bounces@...] On Behalf Of e-zulu > Sent: 20 May 2008 17:11 > To: dbunit-user@... > Subject: [dbunit-user] comparing actual to expected tables > > > Hi All, > > does anyone know if there a way to compare actual Itable to expected by > only > comparing columns specified? > that is not check column counts, but specify which columns need to be > compared? > > thanks for any suggestions > -- > View this message in context: > http://www.nabble.com/comparing-actual-to-expected-tables-tp17344245p173 > 44245.html > Sent from the DBUnit - Users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > dbunit-user mailing list > dbunit-user@... > https://lists.sourceforge.net/lists/listinfo/dbunit-user > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > dbunit-user mailing list > dbunit-user@... > https://lists.sourceforge.net/lists/listinfo/dbunit-user Change the world with e-mail. Join the i’m Initiative from Microsoft. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
| Free Forum Powered by Nabble | Forum Help |