public void test_getPubspec() throws Exception { PubFolderImpl pubFolder = newTarget(); PubspecModel pubspec = pubFolder.getPubspec(); assertNotNull(pubspec); assertSame(pubspec, pubFolder.getPubspec()); assertEquals("myapp", pubspec.getName()); }
public void test_getInvertedSourceContainer() throws Exception { if (!setupSymlinks()) { return; } File file1 = new File(pkg1CanonicalDir, "file1.dart"); File file2 = new File(pkg2CanonicalDir, "file2.dart"); FileBasedSource source1 = new FileBasedSource(file1); FileBasedSource source2 = new FileBasedSource(file2); PubFolderImpl pubFolder = newTarget(); InvertedSourceContainer container1 = pubFolder.getInvertedSourceContainer(); assertFalse(container1.contains(source1)); assertFalse(container1.contains(source2)); FileUtilities2.deleteSymLink(new File(packagesDir, "pkg2")); InvertedSourceContainer container2 = pubFolder.getInvertedSourceContainer(); assertFalse(container2.contains(source1)); assertTrue(container2.contains(source2)); }
public void test_getSdk() throws Exception { PubFolderImpl pubFolder = newTarget(); DartSdk sdk = pubFolder.getSdk(); assertNotNull(sdk); assertSame(expectedSdk, sdk); }