public void ShouldCollectFalseIfNoValueIsGiven() { var collector = new HasMoreCollector(); collector.Collect(new Dictionary <string, object>()); collector.Collected.Should().BeFalse(); }
public void ShouldCollectFalseIfMetadataIsNull() { var collector = new HasMoreCollector(); collector.Collect(null); collector.Collected.Should().BeFalse(); }
public void ShouldReturnSameCollected() { var metadata = new Dictionary <string, object> { { Key, true } }; var collector = new HasMoreCollector(); collector.Collect(metadata); ((IMetadataCollector)collector).Collected.Should().Be(collector.Collected); }
public void ShouldCollect() { var metadata = new Dictionary <string, object> { { Key, true } }; var collector = new HasMoreCollector(); collector.Collect(metadata); collector.Collected.Should().BeTrue(); }
public void ShouldThrowIfValueIsOfWrongType() { var metadata = new Dictionary <string, object> { { Key, "some string" } }; var collector = new HasMoreCollector(); var ex = Record.Exception(() => collector.Collect(metadata)); ex.Should().BeOfType <ProtocolException>().Which .Message.Should() .Contain($"Expected '{Key}' metadata to be of type 'Boolean', but got 'String'."); }