public void ChangeType_LesserEnumWithoutHitStrict_ThrowsException() { // arrange Action fail = () => EnumHelper <TestEnum> .ChangeType <LesserEnum>(TestEnum.C, true); // act fail.Should().Throw <ArgumentException>(); }
public void ChangeType_BiggerEnumStrict_Works() { // act var result = EnumHelper <TestEnum> .ChangeType <BiggerEnum>(TestEnum.B, true); // assert result.Should().Be(BiggerEnum.B); }
public void ChangeType_SameIndexEnumStrict_ThrowsException() { // arrange Action fail = () => EnumHelper <TestEnum> .ChangeType <SameIndexEnum>(TestEnum.B, true); // act + assert fail.Should().Throw <ArgumentException>(); }
public void ChangeType_SubstituteEnumWithOtherKeyStrict_ThrowsException() { // arrange Action fail = () => EnumHelper <TestEnum> .ChangeType <LongTestEnum>(TestEnum.B, true); // act + assert fail.Should().Throw <ArgumentException>(); }
public void ChangeType_SubstituteEnumStrict_Works() { // act var result = EnumHelper <TestEnum> .ChangeType <SubstituteEnum>(TestEnum.B, true); // assert result.Should().Be(SubstituteEnum.B); }
public void ChangeType_LesserEnumWithHit_ReturnsTrue() { // act var result = EnumHelper <TestEnum> .ChangeType <LesserEnum>(TestEnum.B); // assert result.Should().Be(LesserEnum.B); }
public void ChangeType_SameIndexEnum_Works() { // act var result = EnumHelper <TestEnum> .ChangeType <SameIndexEnum>(TestEnum.B); // assert result.Should().Be(SameIndexEnum.Y); }
public void ChangeType_SubstituteEnumWithOtherKey_Works() { // act var result = EnumHelper <TestEnum> .ChangeType <LongTestEnum>(TestEnum.B); // assert result.Should().Be(LongTestEnum.B); }