2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.test.model;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
12 import java.util.stream.Stream;
13 import org.junit.jupiter.params.ParameterizedTest;
14 import org.junit.jupiter.params.provider.Arguments;
15 import org.junit.jupiter.params.provider.MethodSource;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns._default.value.test.norev.MyBits;
18 public class Mdsal744Test {
20 @MethodSource("values")
21 public void testBitsToString(final String expected, final boolean zero, final boolean one) {
22 assertEquals(expected, new MyBits(one, false, zero).toString());
25 static Stream<Arguments> values() {
27 Arguments.of("MyBits{}", false, false),
28 Arguments.of("MyBits{bitOne}", false, true),
29 Arguments.of("MyBits{bitZero}", true, false),
30 Arguments.of("MyBits{bitZero, bitOne}", true, true));