本文整理汇总了Java中com.tagmycode.sdk.model.LanguagesCollection类的典型用法代码示例。如果您正苦于以下问题:Java LanguagesCollection类的具体用法?Java LanguagesCollection怎么用?Java LanguagesCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LanguagesCollection类属于com.tagmycode.sdk.model包,在下文中一共展示了LanguagesCollection类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populateSnippetDialogWithExistentLanguageOverridePreferredLanguage
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
@Test
public void populateSnippetDialogWithExistentLanguageOverridePreferredLanguage() throws Exception {
final Framework framework = createFramework();
LanguagesCollection languageCollection = resourceGenerate.aLanguageCollection();
Language customLanguage = new Language();
customLanguage.setId(88);
customLanguage.setName("Custom");
customLanguage.setCode("custom");
languageCollection.add(customLanguage);
framework.setLanguageCollection(languageCollection);
framework.getStorageEngine().saveLastLanguageUsed(customLanguage);
SnippetDialog snippetDialog = createSnippetDialog(framework);
assertEquals(customLanguage, snippetDialog.getLanguageComboBox().getSelectedItem());
Snippet expectedSnippet = resourceGenerate.aSnippet();
snippetDialog.populateFieldsWithSnippet(expectedSnippet);
assertEquals(expectedSnippet.getLanguage(), snippetDialog.getLanguageComboBox().getSelectedItem());
}
示例2: languagesArePopulatedAfterLogin
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
@Test
public void languagesArePopulatedAfterLogin() throws Exception {
Framework framework = createFramework();
framework.getStorageEngine().saveLanguageCollection(new LanguagesCollection());
framework.start();
framework.getStorageEngine().saveLanguageCollection(resourceGenerate.aLanguageCollection());
SnippetDialog snippetDialog = createSnippetDialog(framework);
framework.getData().loadAll();
snippetDialog.setSnippet(resourceGenerate.aSnippet());
assertEquals(2, framework.getData().getLanguages().size());
assertEquals(2, snippetDialog.getLanguageComboBox().getItemCount());
}
示例3: fetchLanguages
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
@Test
public void fetchLanguages() throws Exception {
Client client = new Client(new TagMyCodeApiProduction(), "123", "456", new VoidOauthWallet());
client.setOauthToken(new OauthToken("123", "456"));
LanguagesCollection languages = new TagMyCode(client).fetchLanguages();
assertTrue(languages.size() > 0);
}
示例4: setLanguageCollection
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
public void setLanguageCollection(LanguagesCollection languageCollection) throws TagMyCodeStorageException {
getStorageEngine().saveLanguageCollection(languageCollection);
}
示例5: setLanguages
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
public TagMyCodeMockBuilder setLanguages(LanguagesCollection languages) throws TagMyCodeException {
when(mockTagMyCode.fetchLanguages()).thenReturn(languages);
return this;
}
示例6: withLanguagesCollection
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
private StorageEngineBuilder withLanguagesCollection(LanguagesCollection languages) throws TagMyCodeStorageException, IOException, TagMyCodeJsonException {
storageEngine.saveLanguageCollection(languages);
return this;
}
示例7: findLanguage
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
private Language findLanguage(TagMyCodeProject tagMyCodeProject, VirtualFile virtualFile) {
LanguagesCollection languages = tagMyCodeProject.getFramework().getData().getLanguages();
return new IntelliJFileToLanguage(languages).find(virtualFile);
}
示例8: IntelliJFileToLanguage
import com.tagmycode.sdk.model.LanguagesCollection; //导入依赖的package包/类
IntelliJFileToLanguage(LanguagesCollection languages) {
this.languages = languages;
}