public void EmptyNode_GetAttribute_ReturnsDefaultKeyValuePair(Fb2Node instance) { if (instance.AllowedAttributes.Count == 0) { return; } instance.Attributes.Should().BeEmpty(); //instance.GetAttribute(instance.AllowedAttributes.First()).Should().Be(default(KeyValuePair<string, string>)); //instance.GetAttribute(instance.AllowedAttributes.First(), true).Should().Be(default(KeyValuePair<string, string>)); instance.GetAttribute(instance.AllowedAttributes.First()).Should().BeNull(); instance.GetAttribute(instance.AllowedAttributes.First(), true).Should().BeNull(); }
private static void CheckAttributes( Fb2Node instance, int expectedCount, string expectedName, string expectedValue) { instance.Should().NotBeNull(); instance.Attributes.Should().HaveCount(expectedCount); instance.Attributes.Should().Contain((attr) => attr.Key == expectedName); //instance.Attributes[expectedName].Should().Be(expectedValue); instance.GetAttribute(expectedName).Value.Should().Be(expectedValue); }