mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[fieldImages] Add utilities to simplify loading of fields (#4456)
This commit is contained in:
19
fieldImages/src/test/java/edu/wpi/fields/LoadConfigTest.java
Normal file
19
fieldImages/src/test/java/edu/wpi/fields/LoadConfigTest.java
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.fields;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
|
||||
class LoadConfigTest {
|
||||
@ParameterizedTest
|
||||
@EnumSource(Fields.class)
|
||||
void testLoad(Fields field) {
|
||||
FieldConfig config = Assertions.assertDoesNotThrow(() -> FieldConfig.loadField(field));
|
||||
|
||||
Assertions.assertNotNull(config.getImageUrl());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user