001package org.nicepop.domain;
002
003/*
004 * #%L
005 * RecipeTest.java - Nicepop Domain Plugin - Popsuite - 2013 - Test7
006 * %%
007 * Copyright (C) 2013 - 2014 Popsuite. All rights reserved-4.
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023import static org.junit.Assert.assertTrue;
024
025import java.util.HashMap;
026import java.util.Map;
027
028import org.junit.Test;
029
030public class RecipeTest {
031
032    private static final Product PRODUCT = new Product("PEPER"); 
033    private static final double PRODUCT_INITIAL_QUANTITY = 10.0; 
034    private static final double PRODUCT_MODIFIED_QUANTITY = 20.0; 
035    
036    @Test
037    public void changeProductTest() {
038        Map<Product, Double> products = new HashMap<>();
039        products.put(PRODUCT, PRODUCT_INITIAL_QUANTITY);
040        
041        Recipe r = new Recipe(1, products);
042        
043        Map<Product, Double> ps = r.getProducts();
044        ps.put(PRODUCT, PRODUCT_MODIFIED_QUANTITY);
045        
046        assertTrue(r.getProducts().get(PRODUCT).equals(PRODUCT_INITIAL_QUANTITY));
047        
048    }
049
050    @Test 
051    public void failingTest() {
052        // FIXME
053        assertTrue(false);
054    }
055}