ko4j/src/test/java/org/netbeans/html/ko4j/ReferenceKnockoutTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 02 Aug 2014 12:59:31 +0200
changeset 790 30f20d9c0986
parent 560 e43da8fe7dbc
child 852 e5723aecdaff
permissions -rw-r--r--
Fixing Javadoc to succeed on JDK8
jaroslav@560
     1
/**
jaroslav@560
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
jaroslav@560
     3
 *
jaroslav@560
     4
 * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved.
jaroslav@560
     5
 *
jaroslav@560
     6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
jaroslav@560
     7
 * Other names may be trademarks of their respective owners.
jaroslav@560
     8
 *
jaroslav@560
     9
 * The contents of this file are subject to the terms of either the GNU
jaroslav@560
    10
 * General Public License Version 2 only ("GPL") or the Common
jaroslav@560
    11
 * Development and Distribution License("CDDL") (collectively, the
jaroslav@560
    12
 * "License"). You may not use this file except in compliance with the
jaroslav@560
    13
 * License. You can obtain a copy of the License at
jaroslav@560
    14
 * http://www.netbeans.org/cddl-gplv2.html
jaroslav@560
    15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
jaroslav@560
    16
 * specific language governing permissions and limitations under the
jaroslav@560
    17
 * License.  When distributing the software, include this License Header
jaroslav@560
    18
 * Notice in each file and include the License file at
jaroslav@560
    19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
jaroslav@560
    20
 * particular file as subject to the "Classpath" exception as provided
jaroslav@560
    21
 * by Oracle in the GPL Version 2 section of the License file that
jaroslav@560
    22
 * accompanied this code. If applicable, add the following below the
jaroslav@560
    23
 * License Header, with the fields enclosed by brackets [] replaced by
jaroslav@560
    24
 * your own identifying information:
jaroslav@560
    25
 * "Portions Copyrighted [year] [name of copyright owner]"
jaroslav@560
    26
 *
jaroslav@560
    27
 * Contributor(s):
jaroslav@560
    28
 *
jaroslav@560
    29
 * The Original Software is NetBeans. The Initial Developer of the Original
jaroslav@560
    30
 * Software is Oracle. Portions Copyright 2013-2014 Oracle. All Rights Reserved.
jaroslav@560
    31
 *
jaroslav@560
    32
 * If you wish your version of this file to be governed by only the CDDL
jaroslav@560
    33
 * or only the GPL Version 2, indicate your decision by adding
jaroslav@560
    34
 * "[Contributor] elects to include this software in this distribution
jaroslav@560
    35
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
jaroslav@560
    36
 * single choice of license, a recipient has the option to distribute
jaroslav@560
    37
 * your version of this file under either the CDDL, the GPL Version 2 or
jaroslav@560
    38
 * to extend the choice of license to its licensees as provided above.
jaroslav@560
    39
 * However, if you add GPL Version 2 code and therefore, elected the GPL
jaroslav@560
    40
 * Version 2 license, then the option applies only if the new code is
jaroslav@560
    41
 * made subject to such option by the copyright holder.
jaroslav@560
    42
 */
jaroslav@560
    43
package org.netbeans.html.ko4j;
jaroslav@560
    44
jaroslav@560
    45
import static org.testng.Assert.assertNull;
jaroslav@560
    46
import org.testng.annotations.Test;
jaroslav@560
    47
jaroslav@560
    48
/**
jaroslav@560
    49
 *
jtulach@790
    50
 * @author Jaroslav Tulach
jaroslav@560
    51
 */
jaroslav@560
    52
public class ReferenceKnockoutTest {
jaroslav@560
    53
    @Test public void canLoadKnockout() {
jaroslav@560
    54
        Object ret = null;
jaroslav@560
    55
        try {
jaroslav@560
    56
            ret = Knockout.toModel(null);
jaroslav@560
    57
        } catch (NullPointerException ex) {
jaroslav@560
    58
            // npe is OK as we don't have any
jaroslav@560
    59
            // context for the 
jaroslav@560
    60
        }
jaroslav@560
    61
        assertNull(ret, "Either null");
jaroslav@560
    62
    }
jaroslav@560
    63
}