Skip to content

Commit fbf60ef

Browse files
author
Alexander Litus
committed
Merge branch 'master' into proto-messages-validation
Conflicts: client/src/test/java/org/spine3/base/CommandsShould.java
2 parents 6c6dcbc + a4bdf50 commit fbf60ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+767
-827
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ buildscript {
1010

1111
dependencies {
1212
compile group: 'io.grpc', name: 'grpc-all', version: '0.13.1'
13+
testCompile project (path: ":testutil", configuration: 'testArtifacts')
1314
}
1415

1516
apply plugin: 'org.spine3.tools.protobuf-plugin';

client/src/test/java/org/spine3/test/TestCommandFactory.java renamed to client/src/main/java/org/spine3/client/test/TestCommandFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1919
*/
2020

21-
package org.spine3.test;
21+
package org.spine3.client.test;
2222

2323
import com.google.protobuf.Message;
2424
import com.google.protobuf.Timestamp;
25+
import org.spine3.Internal;
2526
import org.spine3.base.Command;
2627
import org.spine3.base.CommandContext;
2728
import org.spine3.base.UserId;
@@ -35,6 +36,7 @@
3536
*
3637
* @author Alexaner Yevsyukov
3738
*/
39+
@Internal
3840
public class TestCommandFactory extends CommandFactory {
3941

4042
public static TestCommandFactory newInstance(String actor, ZoneOffset zoneOffset) {

client/src/main/java/org/spine3/protobuf/MessageField.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import static com.google.common.base.Throwables.propagate;
3434

3535
/**
36-
* Utility class for working with message fields.
36+
* Abstract base for classes working with message fields.
3737
*
3838
* @author Mikhail Mikhaylov
3939
* @author Alexander Yevsyukov
@@ -59,6 +59,11 @@ public abstract class MessageField {
5959
*/
6060
private static final Map<Class<? extends Message>, Method> accessors = Maps.newConcurrentMap();
6161

62+
/**
63+
* Creates an instance for the field with the passed number.
64+
*
65+
* @param index the zero-based index of the field
66+
*/
6267
protected MessageField(int index) {
6368
this.index = index;
6469
}

client/src/test/java/org/spine3/base/CommandsShould.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import com.google.protobuf.Message;
2929
import com.google.protobuf.StringValue;
3030
import org.junit.Test;
31+
import org.spine3.client.test.TestCommandFactory;
3132
import org.spine3.test.RunTest;
3233
import org.spine3.test.TestCommand;
33-
import org.spine3.test.TestCommandFactory;
3434
import org.spine3.type.TypeName;
3535

3636
import java.util.ArrayList;

client/src/test/java/org/spine3/base/ErrorsShould.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import static org.junit.Assert.assertEquals;
2626

27+
@SuppressWarnings("InstanceMethodNamingConvention")
2728
public class ErrorsShould {
2829

2930
@Test

client/src/test/java/org/spine3/test/Tests.java

Lines changed: 0 additions & 87 deletions
This file was deleted.

client/src/test/java/org/spine3/test/package-info.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

client/src/test/java/org/spine3/type/TypeNameShould.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import org.junit.Test;
2929
import org.spine3.base.Command;
3030
import org.spine3.client.CommandFactory;
31+
import org.spine3.client.test.TestCommandFactory;
3132
import org.spine3.test.RunTest;
32-
import org.spine3.test.TestCommandFactory;
3333

3434
import static org.junit.Assert.*;
3535
import static org.spine3.protobuf.Values.newStringValue;

client/src/test/proto/spine/test/commands.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option java_package="org.spine3.test";
2525
option java_multiple_files = true;
2626
option java_outer_classname = "TestCommands";
2727

28+
// A test command to run a test by the method name.
2829
message RunTest {
2930
string method_name = 1;
3031
}

0 commit comments

Comments
 (0)