All pastes #183338 Raw Edit

Miscellany

public text v1 · immutable
#183338 ·published 2006-09-26 20:33 UTC
rendered paste body
package no.abakus.naut.da.quote;

import java.util.List;

import no.abakus.naut.entity.quote.QuoteBean;
import no.abakus.naut.entity.user.UserBean;

import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;


public class TestIQuoteStorage extends AbstractTransactionalDataSourceSpringContextTests {

	private QuoteBean qb;
	private IQuoteStorage quoteStorage;
	private UserBean ub;
	
    public QuoteBean getQb() {
		return qb;
	}

	public void setQb(QuoteBean qb) {
		this.qb = qb;
	}

	public UserBean getUb() {
		return ub;
	}

	public void setUb(UserBean ub) {
		this.ub = ub;
	}

	protected String[] getConfigLocations() {
        return new String[] { "classpath:TestIQuoteStorage.xml",
        		"classpath:da.xml" };
    }
    
    public void testSaveDeleteFind() {
    	/*
    	assertEquals("idarbo", ub.getUsername());
    	quoteStorage.storeQuoteBean(qb);
    	quoteStorage.findQuote(qb.getId());
    	List <QuoteBean>liste = quoteStorage.getAllQuotes();
    	assertTrue(liste.contains(qb));
    	quoteStorage.deleteQuote(qb);
    	try {
    		quoteStorage.findQuote(qb.getId());
    		fail("Found QuoteBean. Should be deleted.");
    	}
    	catch (org.springframework.dao.InvalidDataAccessApiUsageException e) {
    		
    	}
    	*/
	}
    
    public void testGetNextQuoteBean() {
    	/*
    	quoteStorage.storeQuoteBean(qb);
    	QuoteBean next = quoteStorage.getNextQuote();
    	System.out.println(next.getQuote() + " " + next.getPoints() + " " + next.getLastShown() + "\n");
    	*/
    }

	public IQuoteStorage getQuoteStorage() {
		return quoteStorage;
	}

	public void setQuoteStorage(IQuoteStorage quoteStorage) {
		this.quoteStorage = quoteStorage;
	}
/*
	public QuoteBean getQb1() {
		return qb1;
	}

	public void setQb1(QuoteBean qb1) {
		this.qb1 = qb1;
	}

	public QuoteBean getQb2() {
		return qb2;
	}

	public void setQb2(QuoteBean qb2) {
		this.qb2 = qb2;
	}

	public QuoteBean getQb3() {
		return qb3;
	}

	public void setQb3(QuoteBean qb3) {
		this.qb3 = qb3;
	}

	public QuoteBean getQb4() {
		return qb4;
	}

	public void setQb4(QuoteBean qb4) {
		this.qb4 = qb4;
	}
	*/
}