public void NullTagValueShouldNotCreateAttributes() { var tag = new KeyValuePair <string, object>("foo", null); var attributes = tag.GetAttributes(); CollectionAssert.IsEmpty(attributes); }
public void EmptyResponseStatusShouldNotCreateAttributes() { var tag = new KeyValuePair <string, object>("response.status", ""); var attributes = tag.GetAttributes(); CollectionAssert.IsEmpty(attributes); }
public void TagShouldCreateSingleAttribute() { var tag = new KeyValuePair <string, object>("foo", "bar"); var attributes = tag.GetAttributes(); var expectedAttributes = new[] { new KeyValuePair <string, object>("foo", "bar") }; CollectionAssert.AreEquivalent(expectedAttributes, attributes); }
public void HttpStatusCodeTagShouldCreateAppropriateAttributes() { var tag = new KeyValuePair <string, object>("http.status_code", 200); var attributes = tag.GetAttributes(); var expectedAttributes = new[] { new KeyValuePair <string, object>("response.status", "200"), new KeyValuePair <string, object>("http.statusCode", 200) }; CollectionAssert.AreEquivalent(expectedAttributes, attributes); }
public void NonNumericResponseStatusTagShouldNotCreateHttpStatusCodeAttribute() { var tag = new KeyValuePair <string, object>("response.status", "foo"); var attributes = tag.GetAttributes(); var expectedAttributes = new[] { new KeyValuePair <string, object>("response.status", "foo") }; CollectionAssert.AreEquivalent(expectedAttributes, attributes); }