public void TestDefaultConstructorSetsNameAndValue() { var attribute = new SetCookieAttribute("TestName", "TestValue"); Assert.AreEqual("TestName", attribute.Name); Assert.AreEqual("TestValue", attribute.Value); Assert.AreEqual("/", attribute.Path); }
public void TestSetPathOverridesDefaultValue() { var attribute = new SetCookieAttribute("TestName", "TestValue") { Path = "/MyDomain" }; Assert.AreEqual("TestName", attribute.Name); Assert.AreEqual("TestValue", attribute.Value); Assert.AreEqual("/MyDomain", attribute.Path); }
public void TestToStringReturnsValues() { var attribute = new SetCookieAttribute("TestName", "TestValue") { Path = "/MyDomain" }; var result = attribute.ToString(); StringAssert.Contains("Name: TestName", result); StringAssert.Contains("Value: TestValue", result); StringAssert.Contains("Path: /MyDomain", result); }