Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | package com.enonic.cms.core.structure.menuitem;
import org.junit.Before;
import org.junit.Test;
import com.enonic.cms.core.structure.SiteEntity;
import static org.junit.Assert.*;
public class MenuItemKeysByPathResolverTest
{
private SiteEntity site_0;
@Before
public void before()
{
site_0... | 2,608 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.structure.menuitem;
import org.junit.Test;
import com.enonic.cms.core.AbstractEqualsTest;
import com.enonic.cms.core.SiteKey;
import com.enonic.cms.core.content.ContentKey;
public class ContentHomeKeyEqualsTest
... | 292 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.structure.menuitem;
import org.junit.Test;
import com.enonic.cms.core.AbstractEqualsTest;
import com.enonic.cms.core.SiteKey;
import com.enonic.cms.core.content.ContentKey;
public class ContentHomeEntityEqualsTest
... | 413 |
github-java-corpus | 2,012 | package com.enonic.cms.core.structure.menuitem;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.junit.Before;
import org.junit.Test;
import com.google.common.collect.Lists;
import com.enonic.cms.core.content.ContentEntity;
... | 5,851 |
github-java-corpus | 2,012 | package com.enonic.cms.core.structure.menuitem;
import java.util.SortedSet;
import java.util.TreeSet;
import org.junit.Before;
import org.junit.Test;
import com.enonic.cms.core.content.ContentEntity;
import com.enonic.cms.core.content.ContentKey;
import com.enonic.cms.core.structure.menuitem.section.SectionContentEn... | 795 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.structure;
import org.junit.Test;
import com.enonic.cms.core.AbstractEqualsTest;
public class SiteEntityEqualsTest
extends AbstractEqualsTest
{
@Test
public void testEquals()
{
assertEqualsCo... | 207 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.structure;
import java.util.Date;
import org.joda.time.DateTime;
import org.mockito.Mockito;
import com.enonic.cms.framework.xml.XMLDocument;
import com.enonic.cms.framework.xml.XMLDocumentFactory;
import com.enonic... | 913 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Sep 23, 2009
*/
public class CacheSettingsTest
{
@Test
public void anyEnabledForverGetsSecondsToLiveSetToIntegerMax()
{
assertEqu... | 985 |
github-java-corpus | 2,012 | package com.enonic.cms.core.preview;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.Attribute;
import com.enonic.cms.core.servlet.ServletRequestAccessor;
public class PreviewServiceImplWithRequestTest
{
... | 657 |
github-java-corpus | 2,012 | package com.enonic.cms.core.preview;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class PreviewServiceImplNoRequestTest
{
private PreviewServiceImpl previewService;
@Before
public void setUp()
throws Exception
{
previewService = new PreviewServiceImp... | 189 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.TestCase;
import com.enonic.cms.core.content.ContentKey;
import com.enonic.cms.core.portal.Co... | 2,241 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.junit.Assert;
public abstract class AbstractEqualsTest
{
protected void assertEqualsContract()
{
testAllUnequalsAreUnequal();
testReflexive();
testSymmetric();
t... | 668 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Aug 6, 2010
*/
public class AdminSiteDebugBasePathTest
{
@Test
public void getAsPath()
{
assertEquals( "/admin/site/0", new AdminS... | 183 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import java.util.HashMap;
import org.junit.Test;
import static junitx.framework.Assert.assertNotEquals;
import static org.junit.Assert.*;
public class CaseInsensitiveStringTest
extends AbstractEqualsTest
{
... | 965 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.timezone;
import java.util.ArrayList;
import java.util.List;
import org.custommonkey.xmlunit.Diff;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
import org.joda.time.DateTime... | 713 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.timezone;
import java.util.List;
import org.joda.time.DateTimeZone;
import org.junit.Assert;
import org.junit.Test;
public class TimeZoneServiceImplTest
{
@Test
public void testGetTimeZones()
{
Ti... | 118 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.home;
import java.io.File;
import java.util.Properties;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import static org.junit.Assert.*;
public class H... | 580 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import java.io.IOException;
import org.jdom.Document;
import org.jdom.JDOMException;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import junit.framework.TestCase... | 370 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.vhost.VirtualHostHelper;
import static org.junit.Assert.*;
/**
* Aug 9, 2010
*/
public class Deploymen... | 516 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal;
import org.junit.Assert;
import org.junit.Test;
import com.enonic.cms.core.Path;
public class WindowReferenceTest
{
private WindowReference reference;
@Test
public void testParse_without_window()
throws Exception
{
reference = WindowReference.parse... | 677 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.xml;
import java.net.URL;
import java.util.List;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
import org.junit.Test;
import com.enonic.cms.core.portal.datasource2.DataSourceException;
import static org.junit.Assert.assertEquals;
import static org.junit.A... | 1,181 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.upgrade;
import java.net.URL;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
import org.junit.Test;
import static org.junit.Assert.*;
public class DataSourceUpgradeTest
{
@Test
pub... | 834 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import java.util.List;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.Test;
import org.mockito.Mockito;
import com.google.common.collect.Lists;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHan... | 354 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import org.junit.Test;
import org.mockito.Mockito;
import com.google.common.collect.Lists;
import com.enonic.cms.core.country.Country;
import com.enonic.cms.core.country.CountryCode;
import com.enonic.cms.core.country.CountryService;
import com.enonic.cms.... | 573 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.core.portal.datasource2.DataSourceException;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHandlerTest;
import com.enonic.cms.core.time.TimeService;
public c... | 411 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.core.portal.datasource2.DataSourceException;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHandlerTest;
import com.enonic.cms.core.time.TimeService;
public c... | 334 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.core.portal.datasource2.DataSourceException;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHandlerTest;
import com.enonic.cms.core.http.HTTPService;
public c... | 494 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.core.portal.datasource2.DataSourceException;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHandlerTest;
import com.enonic.cms.core.http.HTTPService;
public c... | 455 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler.util;
import java.util.Locale;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.core.portal.datasource2.handler.AbstractDataSourceHandlerTest;
import com.enonic.cms.core.locale.LocaleService;
public class GetLocalesHandlerTest
extend... | 247 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.datasource2.handler;
import java.net.URL;
import org.jdom.Document;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
import org.junit.Before;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNu... | 415 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.datasource;
import org.jdom.Element;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.RequestParameters;
import com.enonic.c... | 2,102 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.datasource.expressionfunctions;
import org.joda.time.DateTime;
import org.junit.Test;
import com.enonic.cms.core.portal.PortalInstanceKey;
import com.enonic.cms.core.structure.menuitem.MenuItemEntity;
import co... | 3,818 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.image;
import org.junit.Before;
import org.junit.Test;
import junit.framework.TestCase;
import com.enonic.cms.core.image.ImageRequestParser;
public class ImageServiceImplTest
extends TestCase
{
priva... | 131 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by IntelliJ IDEA.
* User: rmh
* Date: Mar 17, 2010
* Time: 9:51:04 AM
*/
public class PrettyPathNameCreatorTest
{
public stati... | 1,368 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal;
import org.junit.Test;
import junit.framework.TestCase;
import com.enonic.cms.core.Path;
public class ContentPathResolverTest
extends TestCase
{
@Test
public void testPathsWithoutContentKey()
... | 1,109 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal;
import org.junit.Test;
import com.enonic.cms.core.InvalidKeyException;
import com.enonic.cms.core.SiteKey;
import com.enonic.cms.core.structure.menuitem.MenuItemKey;
import com.enonic.cms.core.structure.portle... | 972 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.cache;
import java.util.Locale;
import org.junit.Before;
import org.junit.Test;
import com.enonic.cms.framework.cache.CacheFacade;
import com.enonic.cms.framework.cache.standard.StandardCacheManager;
import c... | 2,405 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal;
import java.util.HashSet;
import org.junit.Before;
import org.junit.Test;
import junit.framework.TestCase;
import com.enonic.cms.core.Path;
import com.enonic.cms.core.SiteKey;
import com.enonic.cms.core.SitePath;
import com.enonic.cms.core.content.ContentEntity;
import com.enonic... | 3,269 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal;
import org.junit.Before;
import org.junit.Test;
import com.google.common.collect.Sets;
import junit.framework.TestCase;
import com.enonic.cms.core.Path;
import com.enonic.cms.core.SiteKey;
import com.enonic.... | 1,548 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.rendering;
import org.junit.Before;
import org.junit.Test;
import com.enonic.cms.core.security.user.User;
import com.enonic.cms.core.security.user.UserEntity;
import com.enonic.cms.core.security.user.UserType;
... | 1,245 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.rendering.tracing;
import java.util.List;
import org.junit.After;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.security.PortalSecurityHolder;
import com.enonic.cms.core.security.user.UserKey;
import com.enonic.cms.cor... | 914 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.rendering;
import org.junit.Test;
import org.springframework.util.StopWatch;
import static org.junit.Assert.*;
public class RenderedWindowResultTest
{
@Test
public void testStripNamespacesNoNamespace()
{
RenderedWindowResult result = new RenderedWindowResult(... | 531 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.rendering;
import java.util.Locale;
import org.junit.Test;
import com.enonic.cms.core.AbstractEqualsTest;
import com.enonic.cms.core.structure.menuitem.MenuItemKey;
public class PageCacheKeyEqualsTest
ex... | 434 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.rendering;
import java.util.Locale;
import org.junit.Test;
import com.enonic.cms.core.AbstractEqualsTest;
import com.enonic.cms.core.structure.menuitem.MenuItemKey;
public class WindowCacheKeyEqualsTest
... | 524 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.rendering.portalfunctions;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.Attribute;
import c... | 7,545 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import ... | 1,959 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import org.junit.Be... | 3,784 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.io.IOException;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import junit.framework.TestCase;
/**
... | 671 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import org.springframework.web.util.HtmlUtils;
import com.enonic.cms.framework.util.UrlPathEncoder;
import static org.j... | 832 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.util.Arrays;
import org.junit.Test;
import junit.framework.TestCase;
/**
* Created by IntelliJ IDEA.
* User: rmh
* Date: Oct 28, 2010
* Time: 9:21:22 PM
*/
public class CreateCon... | 392 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.io.IOException;
import java.util.Arrays;
import org.junit.Test;
import junit.framework.TestCase;
/**
* Created by IntelliJ IDEA.
* User: rmh
* Date: Nov 20, 2009
* Time: 9:10:09 A... | 495 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import org.junit.Test;
import junit.framework.TestCase;
/**
* Created by IntelliJ IDEA.
* User: rmh
* Date: Nov 25, 2009
* Time: 11:33:24 AM
*/
public class CreateImageUrlInstructionTest
... | 355 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.portal.instruction;
import java.io.IOException;
import java.util.Arrays;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by rmy - Date: Nov 18, 2009
*/
public class WindowPlaceholderInstruct... | 472 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;
import com.enonic.cms.core.portal.datasource.DatasourcesType;
import com.enonic.cms.core.structure.page.WindowKey;
import com.enonic.cms.core.time.MockTimeService;
import static org.junit.Ass... | 1,508 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import static org.junit.Assert.*;
public class PageRenderingTraceTest
{
@Test
public void isConcurrencyBlocked_returns_false_when_concurrency_block_timer_not_stopped()
{
PageRenderingTrace trace = new PageRenderingTrace();
... | 481 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class TracesTest
{
private DateTime currentTime;
@Before
public void before()
{
currentTime = new DateTime( 2012, 6, 5, 13, 0... | 298 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
import org.junit.Test;
import static... | 2,211 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import com.enonic.cms.core.security.user.QualifiedUsername;
import com.enonic.cms.core.security.userstore.UserStoreKey;
import static org.junit.Assert.*;
public class UserTest
{
@Test
public void given_admin_user()
{
User user... | 294 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.joda.time.DateTime;
import org.junit.Test;
import java.security.SecureRandom;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.*;
public class LongestPortalRequestsTest
{
private final static Random RANDOM... | 2,544 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class SimpleDurationTest
{
@Test
public void getAsMilliseconds_returns_1000_when_stop_minus_start_is_one_second()
{
SimpleDuration duration = new SimpleDuration();
dur... | 378 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import static org.junit.Assert.*;
public class PageCacheUsagesResolverTest
{
@Test
public void when_page_has_cacheUsage_but_no_windows_then_cacheUsage_from_page_is_resolved()
{
// setup
PageRenderingTrace pageRendering... | 1,044 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import java.security.SecureRandom;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.*;
public class CurrentPortalRequestsTest
{
private final static Random RANDOM_WHEEL = new SecureRandom();
... | 2,485 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.joda.time.DateTime;
import org.junit.Test;
import static org.junit.Assert.*;
public class DurationTest
{
@Test(expected = NullPointerException.class)
public void setStopTime_throws_exception_when_startTime_is_null()
{
Duration duration = n... | 1,077 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import static org.junit.Assert.*;
public class WindowRenderingTraceTest
{
@Test
public void isConcurrencyBlocked_returns_false_when_concurrency_block_timer_not_stopped()
{
WindowRenderingTrace trace = new WindowRenderingTrace( ... | 511 |
github-java-corpus | 2,012 | package com.enonic.cms.core.portal.livetrace;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class MaxLengthedStringTest
{
@Test
public void input_string_is_unchanged_when_input_string_is_shorted_than_max_allowed()
{
MaxLengthedString str = new MaxLengthedString( "sta... | 211 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Aug 16, 2010
*/
public class SiteBasePathAndSitePathToStringBuilderTest
{
@Test
public void toString_with_AdminDebugSiteBasePath()
{
... | 1,453 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.captcha;
import java.util.HashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession;... | 1,577 |
github-java-corpus | 2,012 | package com.enonic.cms.core.user.field;
import org.junit.Test;
import com.enonic.cms.api.client.model.user.Address;
import com.enonic.cms.api.client.model.user.Gender;
import com.enonic.cms.core.AbstractEqualsTest;
public class UserFieldsEqualsTest
extends AbstractEqualsTest
{
@Test
public void testEqua... | 1,311 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.field;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import org.junit.Test;
import com.enonic.esl.containers.ExtendedMap;
import com.enonic.cms.api.client.model.user.Gender;
impo... | 1,032 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.field;
import org.junit.Test;
import junit.framework.Assert;
public class UserFieldTest
{
@Test
public void testLegalType()
{
UserField field = new UserField( UserFieldType.FIRST_NAME );
... | 150 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.field;
import java.util.Date;
import org.junit.Assert;
import org.junit.Test;
import com.enonic.cms.api.client.model.user.Address;
public class UserFieldTypeTest
{
@Test
public void testGetName()
{
... | 326 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.field;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import junit.framework.Assert;
import com.enonic.cms.api.client.model.user.Address;
public class Addre... | 809 |
github-java-corpus | 2,012 | package com.enonic.cms.core.user.field;
import org.joda.time.DateMidnight;
import org.junit.Test;
import static org.junit.Assert.*;
public class UserFieldHelperTest
{
@Test
public void fromString_given_birthday_on_form_yyyyMMdd()
{
assertEquals( new DateMidnight( 2005, 12, 5 ).toDate(), new UserF... | 100 |
github-java-corpus | 2,012 | package com.enonic.cms.core.user.field;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import org.joda.time.DateMidnight;
import org.junit.Test;
import com.enonic.cms.api.client.model.user.Address;
import com.enonic.cms.api.client.model.user.Gender;
import com.enonic.cms.core.security.us... | 6,874 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user;
import org.junit.Assert;
import org.junit.Test;
import com.enonic.cms.api.client.model.user.Address;
import com.enonic.cms.api.client.model.user.UserInfo;
public class UserInfoTest
{
@Test
public void t... | 212 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.remote;
import org.junit.Assert;
import org.junit.Test;
public class RemoteUserTest
{
@Test
public void testBasic()
{
RemoteUser user = new RemoteUser( "myuser" );
Assert.assertEquals(... | 211 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.remote;
import org.junit.Assert;
import org.junit.Test;
public class RemoteGroupTest
{
@Test
public void testBasic()
{
RemoteGroup group = new RemoteGroup( "mygroup" );
Assert.assertEq... | 186 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core.user.remote;
import org.junit.Assert;
import org.junit.Test;
public class RemotePrincipalTest
{
@Test
public void testEquals()
{
RemotePrincipal user = new RemoteUser( "myuser" );
RemotePri... | 168 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import org.springframework.mock.web.MockHttpServletRequest;
import junit.framework.TestCase;
import com.enonic.cms.core.servlet.ServletRequestAccessor;
public class SiteURLResolverTest
extends TestCase
{
p... | 1,060 |
github-java-corpus | 2,012 | package com.enonic.cms.core.config;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Properties;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Tempo... | 957 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.core;
import java.util.HashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import junit.framework.TestCase;
/**
* Created by IntelliJ IDEA.
* User: rmh
* Date: Feb 12, 2010
* Time: 12:10:48... | 635 |
github-java-corpus | 2,012 | package com.enonic.cms.web.filter;
import javax.servlet.http.HttpServletRequestWrapper;
import org.springframework.mock.web.MockFilterChain;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import junit.framework.TestCase;
public class ASCIICha... | 1,093 |
github-java-corpus | 2,012 | package com.enonic.cms.web.portal;
import javax.servlet.http.HttpServletResponse;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import ... | 1,663 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.web.portal;
import java.io.IOException;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import junit.framework.TestCase;
import com.enonic.cms.core... | 649 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.web.portal;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
imp... | 6,306 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.web.portal;
import java.util.Date;
import java.util.List;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import c... | 1,036 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.web.portal.services;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import junit.framework.TestCase;
import com.enonic.cms.core.MockSitePropertiesS... | 790 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.web.portal.services;
import junit.framework.TestCase;
import com.enonic.cms.core.MockSitePropertiesService;
import com.enonic.cms.core.SiteKey;
import com.enonic.cms.core.structure.SiteService;
import static org.easymock.... | 1,817 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.store.hibernate.cache.invalidation;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import static org.junit.Assert.*;
public class PrimaryKeyResolverTest
{
private PrimaryKeyResolver prima... | 1,479 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.store.hibernate.cache.invalidation;
import java.sql.SQLException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import com.enonic.cms.framework.jdbc.AbstractConnectionDecoratorTest;
import co... | 265 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.store.hibernate.cache.invalidation;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import static org.junit.Assert.*;
public class SqlAnalyzerTest
{
@Test
public void testInsertQueries()
... | 488 |
github-java-corpus | 2,012 | package com.enonic.cms.store.dao;
import java.util.SortedMap;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.orm.hibernate3.HibernateTemplate;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.enonic.cms.framework.cache... | 1,304 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.server.service.admin.mvc.controller;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import org.springframework.util.FileCopyUtils;
import junit.framework.TestCase... | 307 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.server;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.vhost.VirtualHost;
import com.enonic.cms.core.vhost.VirtualHostResolver;
import com.enonic.cms.core.vhost.VirtualHostHelper;
... | 1,616 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.server;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import com.enonic.cms.core.Attribute;
import com.enonic.cms.core.vhost.VirtualHostHelper;
import static org.junit.Assert.*;
/**
... | 2,909 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.framework.io;
import java.io.InputStream;
import junit.framework.TestCase;
public class UnicodeInputStreamTest
extends TestCase
{
public void testPlain()
throws Exception
{
assertBom( null, "bo... | 584 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.framework.io;
import junit.framework.TestCase;
public class ByteOrderMarkTest
extends TestCase
{
public void testInvalid()
{
assertNull( ByteOrderMark.resolve( new byte[0] ) );
assertNull( ByteO... | 254 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.framework.util;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URLDecoder;
import junit.framework.TestCase;
public class UrlPathEncoderTest
extends TestCase
{
... | 1,455 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.framework.util;
import java.net.URL;
import javax.servlet.ServletContext;
import org.mockito.Mockito;
import junit.framework.TestCase;
public class MimeTypeResolverTest
extends TestCase
{
private MimeTypeResolve... | 420 |
github-java-corpus | 2,012 | /*
* Copyright 2000-2011 Enonic AS
* http://www.enonic.com/license
*/
package com.enonic.cms.framework.util;
import org.junit.Test;
import junit.framework.Assert;
public class TIntObjectHashMapTest
{
@Test
public void testKeys()
{
final TIntObjectHashMap map = new TIntObjectHashMap();
... | 412 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.