Created
November 10, 2014 11:43
-
-
Save amixpal/649f6c6d4f165402ab08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void getSchedulerSaForIDTest() throws IllegalArgumentException { | |
LOGGER.info("Testing ->" + this.getClass() | |
+ ".getSchedulerSaForID(String)..."); | |
String optionKey = "Appointment.Reservations.UserID"; | |
DealerUser dealerUserTest; | |
try { | |
List<DealerSetupOption> dso = (List<DealerSetupOption>) commonDBDAO | |
.getList( | |
"select dso from DealerSetupOption dso where dso.optionKey =':" | |
+ optionKey + "'", 1, false); | |
if ((null == dso.get(0))) { | |
Long dealerIdTest = dso.get(0).getDealer().getId(); | |
dealerUserTest = dealerDBDao | |
.getDefaultUserForDealer(dealerIdTest); | |
} else { | |
Long dealerIdTest = dso.get(0).getDealer().getId(); | |
dealerUserTest = dealerDBDao.getDealerUserForID(dealerIdTest); | |
} | |
DealerUser dealerUser = dealerServiceBO | |
.getSchedulerSaForID(dealerUserTest.getDealer().getId() | |
.toString()); | |
if (!CommonTestUtil.compareObjects(dealerUserTest, dealerUser)) { | |
Assert.fail(); | |
} | |
} catch (Exception ex) { | |
LOGGER.error("", ex); | |
Assert.fail(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment