diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/message/DefaultMessageTest.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/message/DefaultMessageTest.java index be2f686..4016eca 100644 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/message/DefaultMessageTest.java +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/message/DefaultMessageTest.java @@ -1,38 +1,20 @@ /* - * Demoiselle Framework - * Copyright (C) 2010 SERPRO - * ---------------------------------------------------------------------------- - * This file is part of Demoiselle Framework. - * - * Demoiselle Framework is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License version 3 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License version 3 - * along with this program; if not, see - * or write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301, USA. - * ---------------------------------------------------------------------------- - * Este arquivo é parte do Framework Demoiselle. - * - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação - * do Software Livre (FSF). - * - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português - * para maiores detalhes. - * - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título - * "LICENCA.txt", junto com esse programa. Se não, acesse - * ou escreva para a Fundação do Software Livre (FSF) Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. + * Demoiselle Framework Copyright (C) 2010 SERPRO + * ---------------------------------------------------------------------------- This file is part of Demoiselle + * Framework. Demoiselle Framework is free software; you can redistribute it and/or modify it under the terms of the GNU + * Lesser General Public License version 3 as published by the Free Software Foundation. This program is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a + * copy of the GNU Lesser General Public License version 3 along with this program; if not, see + * or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. ---------------------------------------------------------------------------- Este arquivo + * é parte do Framework Demoiselle. O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação do Software Livre (FSF). Este + * programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de + * ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português para + * maiores detalhes. Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título "LICENCA.txt", junto com esse + * programa. Se não, acesse ou escreva para a Fundação do Software Livre (FSF) Inc., 51 + * Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. */ package br.gov.frameworkdemoiselle.message; @@ -45,12 +27,10 @@ import static org.powermock.api.easymock.PowerMock.replayAll; import static org.powermock.api.easymock.PowerMock.verifyAll; import java.util.Arrays; -import java.util.ResourceBundle; import org.easymock.EasyMock; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.api.easymock.PowerMock; @@ -58,9 +38,9 @@ import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import br.gov.frameworkdemoiselle.util.Beans; +import br.gov.frameworkdemoiselle.util.ResourceBundle; import br.gov.frameworkdemoiselle.util.Strings; -@Ignore @RunWith(PowerMockRunner.class) @PrepareForTest({ Beans.class, ResourceBundle.class }) public class DefaultMessageTest { @@ -156,8 +136,8 @@ public class DefaultMessageTest { text = "text"; message = new DefaultMessage(text); - assertEquals("DefaultMessage [originalText=" + text + ", parsedText=" + text + ", severity=INFO, params=[]]", - message.toString()); + assertEquals("DefaultMessage [originalText=" + text + ", parsedText=" + text + + ", severity=INFO, params=[], bundle=" + bundle.toString() + "]", message.toString()); text = MOCK_RESOURCE_BUNDLE_KEY; params = new Object[] { "1", "2" }; @@ -165,7 +145,7 @@ public class DefaultMessageTest { assertEquals( "DefaultMessage [originalText=" + text + ", parsedText=" + Strings.getString(bundle.getString(text), params) + ", severity=FATAL, params=" - + Arrays.toString(params) + "]", message.toString()); + + Arrays.toString(params) + ", bundle=" + bundle.toString() + "]", message.toString()); } @Test diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/util/BeansTest.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/util/BeansTest.java index 9963ff4..69bc420 100644 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/util/BeansTest.java +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/util/BeansTest.java @@ -71,7 +71,6 @@ public class BeansTest { String object = "object"; - expect(bean.getBeanClass()).andReturn(null); expect(beanManager.createCreationalContext(EasyMock.anyObject(Contextual.class))).andReturn(null); expect(beanManager.getBeans(EasyMock.anyObject(Class.class))).andReturn(collection); expect( @@ -80,7 +79,7 @@ public class BeansTest { replayAll(beanManager, bean); - // We don't need to instantiate utility classes. But if we don't get in this way, we'll not get 100% cobertura. + // There is no need to instantiate utility classes. But it's the only way to get 100% cobertura. Beans beans = new Beans(); beans.setBeanManager(beanManager); String returned = beans.getReference(String.class); @@ -111,7 +110,7 @@ public class BeansTest { replayAll(beanManager, bean); - // We don't need to instantiate utility classes. But if we don't get in this way, we'll not get 100% cobertura. + // There is no need to instantiate utility classes. But it's the only way to get 100% cobertura. Beans beans = new Beans(); beans.setBeanManager(beanManager); String returned = beans.getReference("something"); @@ -121,5 +120,4 @@ public class BeansTest { verifyAll(); } - } -- libgit2 0.21.2