public void GetEnumDescription() { TestEnum opt = TestEnum.Option1; string check = opt.GetDescription(); Assert.Equal("Option One", check); }
public void GetDescription_WithoutDescription() { // Arrange TestEnum item = TestEnum.Two; // Act string description = item.GetDescription(); // Assert Assert.AreEqual("Two", description); }
public void GetDescription_WithDescription() { // Arrange TestEnum item = TestEnum.One; // Act string description = item.GetDescription(); // Assert Assert.AreEqual(TestEnumOneDescription, description); }
public void GetDescription_DefinedValue_ReturnsDescription(TestEnum value, string expectedResult) { // Act var result = value.GetDescription(); // Assert Assert.Equal(expectedResult, result); }
public void GetDescription_GivenEnumValue_ReturnsDescription(TestEnum testEnum, string expectedDescription) { //Act string description = testEnum.GetDescription(); //Assert description .Should() .Be(expectedDescription); }
public void GetDescription_TestEnum_SecondElement_NET452() { // Arrange TestEnum enumToTest = TestEnum.SecondElement; // Act string actualResults = enumToTest.GetDescription(); // Assert Assert.AreEqual("SecondElementDescription", actualResults); }
public void GetDescription_TestEnum_ThirdElement_NETCOREAPP1_1() { // Arrange TestEnum enumToTest = TestEnum.ThirdElement; // Act string actualResults = enumToTest.GetDescription(); // Assert Assert.AreEqual("ThirdElement", actualResults); }
public void GetDescription_ReturnsCorrectDescriptionCase2() { // Arrange TestEnum enumValue = TestEnum.First; string expectedDescription = "Something"; // Act string actualDescription = enumValue.GetDescription(); // Assert Assert.AreEqual(expectedDescription, actualDescription); }
public void GetDescription_GivenEnumValueThatHasNoAttribute_ReturnsEnumName() { //Arrange TestEnum testEnum = TestEnum.Red; //Act string description = testEnum.GetDescription(); //Assert description .Should() .Be("Red"); }
public void GetDescription_GivenEnumValue_ReturnsDescription() { //Arrange TestEnum testEnum = TestEnum.Green; //Act string description = testEnum.GetDescription(); //Assert description .Should() .Be("green"); }
public void GetDescription_GivenEnumValueThatHasNoAttributeAndNameIfNullIsFalse_ReturnsEmptyString() { //Arrange TestEnum testEnum = TestEnum.Red; //Act string description = testEnum.GetDescription(false); //Assert description .Should() .BeEmpty(); }
public void GetDescription(TestEnum testEnum, string descriptionExpected) { Assert.Equal(descriptionExpected, testEnum.GetDescription()); }
public void GetDescriptionGetsValueOfDescriptionAttributeOrValueNameIfNoDescriptionAttributeExists(TestEnum enumValue, string expectedDescription) { var actualDescription = enumValue.GetDescription(); Assert.AreEqual(expectedDescription, actualDescription); }
public void GetDescriptionExtensionMethod_ShouldReturnExpectedValue_IfInputValueHasDescription(TestEnum input, string expected) { string result = input.GetDescription(); Assert.AreEqual(result, expected); }
public void HLEnumTests_providedEnumDescription_shouldBeValid(TestEnum val, string expectedOutput) { string actualOutput = val.GetDescription(); Assert.AreEqual(actualOutput, expectedOutput); }
//TODO Checar o funcionamento do localized description //[InlineData("This is a Localized Description", TestEnum.SixthItem)] public void MustGetDescription(string expected, TestEnum value) { value.GetDescription().ShouldBe(expected); }
public void GetDescriptionTest() { Assert.That(TestEnum.Value1.GetDescription(), Is.EqualTo("My first value.")); Assert.That(TestEnum.Value2.GetDescription(), Is.EqualTo("Value2")); Assert.That(test.GetDescription(), Is.EqualTo("Value1, Value2")); }
public void TestGetDescription(TestEnum enumValue, string expected) { Assert.That(enumValue.GetDescription(), Is.EqualTo(expected)); }