public void Test_NameValue_ToString() { NameValue nv = new NameValue { Name = "key1", Value = "abc" }; Assert.AreEqual("key1=abc", nv.ToString()); }
public void NameValue_Constructor_Values() { var constructor = new NameValue("testName", "testValue"); Assert.IsNotNull(constructor); Assert.AreEqual("testName", constructor.Name); Assert.AreEqual("testValue", constructor.Value); Assert.AreEqual("testName", constructor.ToString()); }
public void ToString_Should_ReturnExpectedResult_When_ConstructorUsed() { // Arrange const string expected = "TestName=TestValue"; var pair = new NameValue("TestName", "TestValue"); // Act var actual = pair.ToString(); // Assert Assert.Equal(expected, actual); }