1 /* 2 * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package test.javafx.collections; 27 28 import java.util.ArrayList; 29 import java.util.Collection; 30 import java.util.List; 31 import javafx.collections.FXCollections; 32 import javafx.collections.ListChangeListener.Change; 33 import javafx.collections.ObservableList; 34 import javafx.collections.transformation.TransformationList; 35 import org.junit.Before; 36 import org.junit.Ignore; 37 import org.junit.Test; 38 import static org.junit.Assert.* ; 39 40 /** 41 * 42 */ 43 @Ignore 44 public class TransformationListTest { 45 46 private static class TransformationListImpl extends TransformationList<String, String> { 47 48 public TransformationListImpl(ObservableList<String> list) { 49 super(list); 50 } 51 52 @Override 53 protected void sourceChanged(Change<? extends String> change) { 54 throw new UnsupportedOperationException("Not supported yet."); 55 } 56 57 @Override 58 public String get(int index) { 59 throw new UnsupportedOperationException("Not supported yet."); 60 } 61 62 @Override 63 public int size() { 64 throw new UnsupportedOperationException("Not supported yet."); 65 } 66 67 @Override 68 public boolean addAll(String... es) { 69 throw new UnsupportedOperationException("Not supported yet."); 70 } 71 72 @Override 73 public boolean setAll(String... es) { 74 throw new UnsupportedOperationException("Not supported yet."); 75 } 76 77 @Override 78 public boolean setAll(Collection<? extends String> clctn) { 79 throw new UnsupportedOperationException("Not supported yet."); 80 } 81 82 @Override 83 public int getSourceIndex(int i) { 84 throw new UnsupportedOperationException("Not supported yet."); 85 } 86 87 @Override 88 public boolean removeAll(String... es) { 89 throw new UnsupportedOperationException("Not supported yet."); 90 } 91 92 @Override 93 public boolean retainAll(String... es) { 94 throw new UnsupportedOperationException("Not supported yet."); 95 } 96 97 @Override 98 public void remove(int i, int i1) { 99 throw new UnsupportedOperationException("Not supported yet."); 100 } 101 102 } 103 104 private TransformationList<String, String> list1, list2; 105 private ObservableList<String> list3; 106 107 @Before 108 public void setUp() { 109 list3 = FXCollections.observableArrayList(); 110 list2 = new TransformationListImpl(list3); 111 list1 = new TransformationListImpl(list2); 112 } 113 114 @Test 115 public void testDirect() { 116 assertEquals(list2, list1.getSource()); 117 assertEquals(list3, list2.getSource()); 118 } 119 120 }