Skip to content

Commit

Permalink
added copyright header to test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
santhosh-tekuri committed Aug 4, 2015
1 parent fdbe607 commit eac8911
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 60 deletions.
21 changes: 11 additions & 10 deletions core/src/test/java/jlibs/core/graph/sequences/SequenceTest.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.graph.sequences;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.graph.sequences;
Expand Down
21 changes: 11 additions & 10 deletions core/src/test/java/jlibs/core/graph/sequences/TOCSequence.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.graph.sequences;
Expand Down
21 changes: 11 additions & 10 deletions i18n-apt/src/test/java/jlibs/core/i18n/Bundle1.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.i18n;
Expand Down
21 changes: 11 additions & 10 deletions i18n-apt/src/test/java/jlibs/core/i18n/Bundle2.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.i18n;
Expand Down
21 changes: 11 additions & 10 deletions i18n-apt/src/test/java/jlibs/core/i18n/ResourceBundleTest.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* JLibs: Common Utilities for Java
* Copyright (C) 2009 Santhosh Kumar T <santhosh.tekuri@gmail.com>
* Copyright 2015 Santhosh Kumar Tekuri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* This library 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
* Lesser General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.core.i18n;
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<header>src/etc/header.txt</header>
<includes>
<include>**/src/main/**</include>
<include>**/src/test/**</include>
<include>**/bin/**</include>
</includes>
<excludes>
Expand Down
75 changes: 75 additions & 0 deletions wamp4j-core/src/test/java/jlibs/wamp4j/SubscriptionOperator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* Copyright 2015 Santhosh Kumar Tekuri
*
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.wamp4j;

import com.fasterxml.jackson.databind.node.ObjectNode;
import jlibs.wamp4j.client.Subscription;
import jlibs.wamp4j.client.WAMPClient;
import jlibs.wamp4j.msg.EventMessage;

import java.util.concurrent.atomic.AtomicReference;

import static org.testng.Assert.assertEquals;

/**
* @author Santhosh Kumar Tekuri
*/
public class SubscriptionOperator{
private Subscription subscription;
private final AtomicReference<Object> atomic = new AtomicReference<Object>();

public SubscriptionOperator(String topic){
subscription = new Subscription(topic){
@Override
public void onSubscribe(WAMPClient client){
atomic.set(true);
}

@Override
public void onUnsubscribe(WAMPClient client){
atomic.set(false);
}

@Override
public void onEvent(EventMessage event){
onMessage(event);
}

@Override
public void onError(WAMPClient client, WAMPException error){
atomic.set(error);
}
};
}

public void onMessage(EventMessage event){}

private ClientOperator client;
public void subscribeWith(ObjectNode options, ClientOperator client) throws Throwable{
atomic.set(null);
client.client.subscribe(options, subscription);
assertEquals(Await.getResult(atomic), Boolean.TRUE);
this.client = client;
}

public void unsubscribe() throws Throwable{
atomic.set(null);
client.client.unsubscribe(subscription);
assertEquals(Await.getResult(atomic), Boolean.FALSE);
client = null;
}
}
16 changes: 16 additions & 0 deletions xml/src/test/java/jlibs/xml/sax/NamespaceReplacerTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2015 Santhosh Kumar Tekuri
*
* The JLibs authors license this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package jlibs.xml.sax;

import jlibs.xml.xsl.TransformerUtil;
Expand Down

0 comments on commit eac8911

Please sign in to comment.