Package com.yummynoodlebar.config

Source Code of com.yummynoodlebar.config.PersistenceDomainIntegrationTest

package com.yummynoodlebar.config;

import static junit.framework.TestCase.assertEquals;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.yummynoodlebar.events.menu.AllMenuItemsEvent;
import com.yummynoodlebar.events.menu.RequestAllMenuItemsEvent;
import com.yummynoodlebar.persistence.services.MenuPersistenceService;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {PersistenceConfig.class})
public class PersistenceDomainIntegrationTest {
 
  @Autowired
  MenuPersistenceService menuPersistenceService;
   
  @Test
  public void thatAllMenuItemsReturned() {
   
  AllMenuItemsEvent allMenuItems = menuPersistenceService.requestAllMenuItems(new RequestAllMenuItemsEvent());
 
  assertEquals(3, allMenuItems.getMenuItemDetails().size());
     
  }

}
TOP

Related Classes of com.yummynoodlebar.config.PersistenceDomainIntegrationTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.