public void Default_Naming_Convention_Int() { // arrange var testCase = new LabeledTestCase <int>(1); // assert Assert.NotNull(testCase.Name); Assert.Equal("1", testCase.Name); Assert.Equal("1", testCase.ToString()); }
public void Default_Naming_Convention_Decimal() { // arrange var testCase = new LabeledTestCase <decimal>(1.2m); // assert Assert.NotNull(testCase.Name); Assert.Equal("1.2", testCase.Name); Assert.Equal("1.2", testCase.ToString()); }
public void Default_Naming_Convention_NoValue() { // arrange var testCase = new LabeledTestCase <object>(); // assert Assert.NotNull(testCase.Name); Assert.Equal("Object", testCase.Name); Assert.Equal("Object", testCase.ToString()); }
public void TestCase_Uses_IFormattableAsString() { // arrange var testCase = new LabeledTestCase <object>(new TestFormattable()); // act var result = testCase.ToString(); // assert Assert.Equal("TestFormattable", result); }
public void Default_Naming_Value_Conventions(object value, string expectedName) { // arrange var testCase = new LabeledTestCase <object>(value); // assert Assert.Equal(expectedName, testCase.Name); Assert.Equal(expectedName, testCase.ToString()); Assert.Equal(value, testCase.Parameters); }
public void WithName_Sets_Value() { // arrange var testCase = new LabeledTestCase <object>().WithName("name"); // assert Assert.NotNull(testCase.Name); Assert.Equal("name", testCase.Name); Assert.Equal("name", testCase.ToString()); }
public void Default_Naming_Convention_Long() { // arrange var testCase = new LabeledTestCase <long>(123L); // assert Assert.NotNull(testCase.Name); Assert.Equal("123", testCase.Name); Assert.Equal("123", testCase.ToString()); }