org.sonar.db.protobuf.DbFileSources.Test.TestStatus value = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(3, rawValue);
public static TestStatus valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; }
/** * <code>optional .org.sonar.server.source.db.Test.TestStatus status = 3;</code> */ public Builder setStatus(org.sonar.db.protobuf.DbFileSources.Test.TestStatus value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; status_ = value.getNumber(); onChanged(); return this; } /**
writer.prop(FIELD_TEST_UUID, test.getUuid()); writer.prop(FIELD_NAME, test.getName()); writer.prop(FIELD_STATUS, test.hasStatus() ? test.getStatus().toString() : null); writer.prop(FIELD_DURATION_IN_MS, test.hasExecutionTimeMs() ? test.getExecutionTimeMs() : null); writer.prop(FIELD_MESSAGE, test.hasMsg() ? test.getMsg() : null);
private Multimap<String, DbFileSources.Test.Builder> buildDbTests(int componentRed) { Multimap<String, DbFileSources.Test.Builder> tests = ArrayListMultimap.create(); try (CloseableIterator<ScannerReport.Test> testIterator = reportReader.readTests(componentRed)) { while (testIterator.hasNext()) { ScannerReport.Test batchTest = testIterator.next(); DbFileSources.Test.Builder dbTest = DbFileSources.Test.newBuilder(); dbTest.setUuid(Uuids.create()); dbTest.setName(batchTest.getName()); if (!batchTest.getStacktrace().isEmpty()) { dbTest.setStacktrace(batchTest.getStacktrace()); } if (batchTest.getStatus() != TestStatus.UNSET) { dbTest.setStatus(DbFileSources.Test.TestStatus.valueOf(batchTest.getStatus().name())); } if (!batchTest.getMsg().isEmpty()) { dbTest.setMsg(batchTest.getMsg()); } dbTest.setExecutionTimeMs(batchTest.getDurationInMs()); tests.put(dbTest.getName(), dbTest); } } return tests; }
/** * <code>optional .org.sonar.server.source.db.Test.TestStatus status = 3;</code> */ public org.sonar.db.protobuf.DbFileSources.Test.TestStatus getStatus() { org.sonar.db.protobuf.DbFileSources.Test.TestStatus result = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.valueOf(status_); return result == null ? org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK : result; }
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
/** * <code>optional .org.sonar.server.source.db.Test.TestStatus status = 3;</code> */ public org.sonar.db.protobuf.DbFileSources.Test.TestStatus getStatus() { org.sonar.db.protobuf.DbFileSources.Test.TestStatus result = org.sonar.db.protobuf.DbFileSources.Test.TestStatus.valueOf(status_); return result == null ? org.sonar.db.protobuf.DbFileSources.Test.TestStatus.OK : result; } /**
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor