// Path: se.bitcraze.crazyflie.lib/src/test/java/se/bitcraze/crazyflie/lib/OfflineTests.java
// public interface OfflineTests {
// 
// }
// 
// Path: se.bitcraze.crazyflie.lib/src/main/java/se/bitcraze/crazyflie/lib/bootloader/Target.java
// public static class TargetTypes {
//     public static final int STM32 = 0xFF;
//     public static final int NRF51 = 0xFE;
// 
//     private TargetTypes() {
//         throw new IllegalStateException("Utility class");
//     }
// 
//     public static String toString(int target) {
//         if (target == TargetTypes.STM32) {
//             return "stm32";
//         } else if (target == TargetTypes.NRF51) {
//             return "nrf51";
//         }
//         return "Unknown";
//     }
// 
//     public static int fromString(String name) {
//         if ("stm32".equalsIgnoreCase(name)) {
//             return TargetTypes.STM32;
//         } else if ("nrf51".equalsIgnoreCase(name)) {
//             return TargetTypes.NRF51;
//         }
//         return 0;
//     }
// }


import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import se.bitcraze.crazyflie.lib.OfflineTests;
import se.bitcraze.crazyflie.lib.bootloader.Target.TargetTypes;
package se.bitcraze.crazyflie.lib.bootloader;





@Category(OfflineTests.class)
@SuppressWarnings("java:S106")
public class UtilitiesTest {

    @Test
    public void testBootVersion() {
        assertEquals("Crazyflie Nano Quadcopter (1.0)", BootVersion.toVersionString(BootVersion.CF1_PROTO_VER_0));
        assertEquals("Crazyflie Nano Quadcopter (1.0)", BootVersion.toVersionString(BootVersion.CF1_PROTO_VER_1));
        assertEquals("Crazyflie 2.0", BootVersion.toVersionString(BootVersion.CF2_PROTO_VER));
        assertEquals("Unknown", BootVersion.toVersionString(0x12));
    }

    @Test
    public void testTargetTypes() {
// Path: se.bitcraze.crazyflie.lib/src/test/java/se/bitcraze/crazyflie/lib/OfflineTests.java
// public interface OfflineTests {
// 
// }
// 
// Path: se.bitcraze.crazyflie.lib/src/main/java/se/bitcraze/crazyflie/lib/bootloader/Target.java
// public static class TargetTypes {
//     public static final int STM32 = 0xFF;
//     public static final int NRF51 = 0xFE;
// 
//     private TargetTypes() {
//         throw new IllegalStateException("Utility class");
//     }
// 
//     public static String toString(int target) {
//         if (target == TargetTypes.STM32) {
//             return "stm32";
//         } else if (target == TargetTypes.NRF51) {
//             return "nrf51";
//         }
//         return "Unknown";
//     }
// 
//     public static int fromString(String name) {
//         if ("stm32".equalsIgnoreCase(name)) {
//             return TargetTypes.STM32;
//         } else if ("nrf51".equalsIgnoreCase(name)) {
//             return TargetTypes.NRF51;
//         }
//         return 0;
//     }
// }


// Path: se.bitcraze.crazyflie.lib/src/test/java/se/bitcraze/crazyflie/lib/bootloader/UtilitiesTest.java
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import se.bitcraze.crazyflie.lib.OfflineTests;
import se.bitcraze.crazyflie.lib.bootloader.Target.TargetTypes;

package se.bitcraze.crazyflie.lib.bootloader;





@Category(OfflineTests.class)
@SuppressWarnings("java:S106")
public class UtilitiesTest {

    @Test
    public void testBootVersion() {
        assertEquals("Crazyflie Nano Quadcopter (1.0)", BootVersion.toVersionString(BootVersion.CF1_PROTO_VER_0));
        assertEquals("Crazyflie Nano Quadcopter (1.0)", BootVersion.toVersionString(BootVersion.CF1_PROTO_VER_1));
        assertEquals("Crazyflie 2.0", BootVersion.toVersionString(BootVersion.CF2_PROTO_VER));
        assertEquals("Unknown", BootVersion.toVersionString(0x12));
    }

    @Test
    public void testTargetTypes() {
        assertEquals("stm32", TargetTypes.toString(TargetTypes.STM32));