public void WithName_Throws_ArgumentException(string name) { // arrange var testCase = new LabeledTestCase <object>(); // act && assert Assert.Throws <ArgumentException>("name", () => testCase.WithName(name)); }
public void Serialization_Validation() { // arrange var testCase = new LabeledTestCase <object>(); // act & assert Assert.Throws <ArgumentNullException>("info", () => testCase.Serialize(null)); Assert.Throws <ArgumentNullException>("info", () => testCase.Deserialize(null)); }
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_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_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()); }
public void Operator_Test() { // arrange var testCase = new LabeledTestCase <int>(42); // act object[] values = testCase; // assert Assert.NotNull(values); Assert.Equal("42", values[0].ToString()); }
public void Single_Value_Test_Cases(LabeledTestCase <int> t) { Assert.NotNull(t); Assert.NotEmpty($"{t.Parameters}"); }