This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.clouway.networkingandgui.agent; | |
| import com.google.common.io.ByteStreams; | |
| import org.jmock.Expectations; | |
| import org.jmock.integration.junit4.JUnitRuleMockery; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import java.io.File; | |
| import java.io.FileInputStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class MyTest { | |
| public void testAddTwoNumbers() { | |
| System.out.println("Adding two numbers"); | |
| } | |
| public Date testJanuary(int year, int day) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) | |
| @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) | |
| public @interface MyTestAnnotation { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.clouway.patterns.proxytodell; | |
| /** | |
| * @author Ivan Genchev ([email protected]) | |
| */ | |
| //Клиента работи с обект от клас А, но реално вижда че работи само с клас Б. | |
| // Реален клас <- ->Proxy | |
| // Integer class <- ->IntegerProxy | |
| // Да се направи IntegerProxy. Има 1 мениджър (IntegerFactory), който създава инстанции чрез метода си createInstance(). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package task1.adapter.persistence; | |
| import com.google.common.collect.Lists; | |
| import task1.core.User; | |
| import task1.core.UserRepository; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package task4; | |
| import java.util.List; | |
| /** | |
| * @author Ivan Genchev ([email protected]) | |
| */ | |
| public class MyClass { | |
| class Customer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package xml.sax; | |
| import org.junit.Test; | |
| import java.util.List; | |
| import static org.hamcrest.MatcherAssert.assertThat; | |
| import static org.hamcrest.core.Is.is; | |
| public class ParseJavaObjectsWithSaxTest { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.clouway.servlets; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.Cookie; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import javax.servlet.http.HttpSession; | |
| import java.io.IOException; | |
| import java.security.MessageDigest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ConnectionProvider implements Provider<Connection> { | |
| @Override | |
| public Connection get() { | |
| return ConnectionFilter.connectionThreadLocal.get(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package client | |
| import ( | |
| "fmt" | |
| "net" | |
| "time" | |
| ) | |
| type Client struct { | |
| Host string |
OlderNewer