mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-27 12:15:50 +01:00
committed by
Greyson Parrelli
parent
9e49dd1270
commit
cee44fcc93
@@ -1,35 +0,0 @@
|
||||
package org.whispersystems.util;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class FlagUtilTest {
|
||||
|
||||
@Test
|
||||
public void given1_whenIConvertToBinaryFlag_thenIExpect1() {
|
||||
int expected = 1;
|
||||
|
||||
int actual = FlagUtil.toBinaryFlag(1);
|
||||
|
||||
Assert.assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void given2_whenIConvertToBinaryFlag_thenIExpect2() {
|
||||
int expected = 2;
|
||||
|
||||
int actual = FlagUtil.toBinaryFlag(2);
|
||||
|
||||
Assert.assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void given3_whenIConvertToBinaryFlag_thenIExpect4() {
|
||||
int expected = 4;
|
||||
|
||||
int actual = FlagUtil.toBinaryFlag(3);
|
||||
|
||||
Assert.assertEquals(expected, actual);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.whispersystems.util
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class FlagUtilTest {
|
||||
@Test
|
||||
fun given1_whenIConvertToBinaryFlag_thenIExpect1() {
|
||||
assertEquals(1, FlagUtil.toBinaryFlag(1))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun given2_whenIConvertToBinaryFlag_thenIExpect2() {
|
||||
assertEquals(2, FlagUtil.toBinaryFlag(2))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun given3_whenIConvertToBinaryFlag_thenIExpect4() {
|
||||
assertEquals(4, FlagUtil.toBinaryFlag(3))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user