Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,25 @@ public static void valueTypes(WrapperCloud wrapper) throws Exception {

assertNotNull("Value of " + property.getName() + " is null. ", value);
assertTrue(AspectPropertyValue.class.isAssignableFrom(value.getClass()));
AspectPropertyValue<?> propertyValue =
(AspectPropertyValue<?>) value;
// A property the resource key is not entitled to, or one
// the client script populates, is listed but carries no
// value and says why instead. Asking such a value for its
// type throws, so what is checked here is that the reason
// was given, which is what a caller reads.
if (propertyValue.hasValue() == false) {
assertNotNull("Property '" + property.getName() +
"' has no value and no reason was given.",
propertyValue.getNoValueMessage());
continue;
}
assertTrue("Value of '" + property.getName() +
"' was of type " + ((AspectPropertyValue<?>) value).getValue().getClass().getSimpleName() +
"' was of type " + propertyValue.getValue().getClass().getSimpleName() +
" but should have been " + expectedType.getSimpleName() +
".",
expectedType.isAssignableFrom(
((AspectPropertyValue<?>) value).getValue().getClass()));
propertyValue.getValue().getClass()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

@Ignore
public class ValueCloudTests extends TestsBase {

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import fiftyone.pipeline.engines.services.MissingPropertyReason;
import fiftyone.pipeline.engines.services.MissingPropertyResult;
import fiftyone.pipeline.engines.services.MissingPropertyService;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.ILoggerFactory;
import org.slf4j.LoggerFactory;
Expand All @@ -46,7 +45,6 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

@Ignore
public class MissingPropertyHandlingTests {

protected static final ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();
Expand Down Expand Up @@ -136,7 +134,7 @@ public void PropertyNotInResource() throws Exception {

private static String nullValueJson =
"{\n" +
" 'ip-intelligence': {\n" +
" 'ip': {\n" +
" 'registeredname': 'Example Network',\n" +
" 'registeredcountry': 'US',\n" +
" 'latitude': null,\n" +
Expand Down
Loading