1   /*
2    * This file is part of AceLogger.
3    * 
4    * AceLogger is free software: you can redistribute it and/or modify it under the terms of the GNU
5    * Lesser General Public License as published by the Free Software Foundation, either version 3 of
6    * the License, or (at your option) any later version.
7    * 
8    * AceLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
9    * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10   * Lesser General Public License for more details.
11   * 
12   * You should have received a copy of the GNU Lesser General Public License along with AceLogger.
13   * If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
14   */
15  package net.sourceforge.acelogger.formatter.test;
16  
17  import org.testng.annotations.BeforeMethod;
18  import org.testng.annotations.DataProvider;
19  import org.testng.annotations.Test;
20  
21  import net.sourceforge.acelogger.LogEvent;
22  import net.sourceforge.acelogger.formatter.EmptyFormatter;
23  import net.sourceforge.acelogger.test.DataProviderHelper;
24  
25  import static org.testng.Assert.assertEquals;
26  
27  /**
28   * TODO: Create Doc.
29   * 
30   * @author Zardi (https://sourceforge.net/users/daniel_zardi)
31   * @version 1.0.0
32   * @since 1.0.0
33   */
34  @Test
35  public class EmptyFormatterTest {
36  
37  	private EmptyFormatter formatter;
38  
39  	@BeforeMethod
40  	public void setUp() {
41  		formatter = null;
42  	}
43  
44  	@DataProvider(name = "formatLogCallDataProvider")
45  	public Object[][] formatLogCallDataProvider() {
46  		return DataProviderHelper.loadData();
47  	}
48  
49  	@Test(dataProvider = "formatLogCallDataProvider")
50  	public void testFormatLogCall(LogEvent call) {
51  		formatter = new EmptyFormatter("EmptyFormatterTest.testFormatLogCall");
52  		String message = formatter.formatLogCall(call);
53  		assertEquals(message, "");
54  	}
55  
56  	@Test
57  	public void testGetIdentifier() {
58  		formatter = new EmptyFormatter("EmptyFormatterTest.testGetIdentifier");
59  		assertEquals(formatter.getIdentifier(), "EmptyFormatterTest.testGetIdentifier");
60  	}
61  
62  }