![]() ![]() ![]()
Какой рейтинг вас больше интересует?
|
Главная /
Каталог блоговCтраница блогера Yarixxx/Записи в блоге |
![]() |
|
GWT: How to use @UiFactory
2015-05-02 10:52:23 (читать в оригинале)There is a way to escape using @UiConstructor. Instead of it we can use @UiFactory. The idea is simple again: remove @UiConstructor from our widget and add @UiFactory annotated method. Here is a Widget without @UiConstructor. public CustomPanel(String text) { initWidget(ourUiBinder.createAndBindUi(this)); myLabel.setText(text); } we would like to use this constructor. In order to do this, […]
GWT: How to use @UiConstructor
2015-05-01 23:20:29 (читать в оригинале)@UiConstructor is a special annotation for a custom widgets with *.ui.xml templates. In order to use it we can place it on a preferred constructor. @UiConstructor public MyPanel() { initWidget(uiBinder.createAndBindUi(this)); } This annotation can be used only if Inject package declared in a *.gwt.xml. <inherits name="com.google.gwt.inject.Inject"/> By default GWT 2.6 does not contain jar file […]
How to mock Java class with EasyMock
2015-05-01 18:34:05 (читать в оригинале)In the previous post I’ve covered topic of creation of mocks with Mockito. There is one more way to mock required Java class: to use EasyMock. Our unit-test should extend EasyMockSupport class. import org.easymock.EasyMockRule; import org.easymock.EasyMockSupport; import org.easymock.Mock; import org.easymock.TestSubject; import org.junit.Rule; import org.junit.Test; public class BusinessLogicTest extends EasyMockSupport { //... } Also this class […]
Environment simulation for Java class with Mockito
2015-04-30 22:24:28 (читать в оригинале)In the previous post about JUnit I’ve wrote about process of creation unit-tests. In addition to plain JUnit we can use Mockito. It is a handy way to write Java class with JUnit relying on other classes functionality without their actual implementation. The idea is to create mock of another class based on it’s interface […]
How to write unit-tests in Java
2015-04-29 23:43:02 (читать в оригинале)Writing unit tests for Java applications is quite a simple process. In order to do this we can use JUnit. Any group of tests are simple Java class with special annotations. For example: import static org.junit.Assert.*; import org.junit.Test; public class MySimpleTest { @Test public void testIfTrue() throws Exception { assertTrue(true); } } it will always […]


Категория «Поп звезды»
Взлеты Топ 5
![]() | ||
+173 |
226 |
Наша жизнь просто прекрасна |
+168 |
219 |
Little Showroom |
+160 |
212 |
Heilig |
+147 |
233 |
Ulanet.ru - Информационно-развлекательный сайт города Улан-Удэ |
+17 |
29 |
КАТЯ ЧЕХОВА 2008 |
Падения Топ 5
![]() | ||
-1 |
73 |
Список диет |
-1 |
43 |
Диетические рецепты |
-1 |
8 |
Nique |
-2 |
7 |
anmak |
-2 |
9 |
Vlad_Topalov |

Популярные за сутки
Загрузка...

BlogRider.ru не имеет отношения к публикуемым в записях блогов материалам. Все записи
взяты из открытых общедоступных источников и являются собственностью их авторов.
взяты из открытых общедоступных источников и являются собственностью их авторов.