public void BitContext_HasBitEnum_Test() { var target = new BitContext(null); target.SetBits(11); const bool expected = true; var actual = target.HasBit(EnumTest.Bittwo); actual.Should().Be(expected); }
public void BitContext_SetBits_Test() { var target = new BitContext(null); target.SetBits(8); const int expected = 8; var actual = target.GetBits; actual.Should().Be(expected); }
public void SetBits_Fact() { var fake = new FakeEntity(1, "Fact"); var ctx = new BitContext(fake); const int val = (int)(FactEnum.Fact1 | FactEnum.Fact2); ctx.SetBits(val); ctx.GetBits.Should().Be(val); }
public void BitContext_SetBitEnum_Test() { var target = new BitContext(null); target.SetBits(8); target.SetBit(EnumTest.Bitfour); const int expected = 12; var actual = target.GetBits; actual.Should().Be(expected); }
public void BitContext_UnsetBitInt_Test() { var target = new BitContext(null); target.SetBits(11); target.UnsetBit(2); const bool expected = false; var actual = target.HasBit(2); actual.Should().Be(expected); }