Beispiel #1
0
        public void FromBsonDocument_should_return_null_when_supplied_invalid_BsonDocument()
        {
            var invalidTopologyVersionDocument = new BsonDocument("counter", 31);

            TopologyVersion subject = TopologyVersion.FromBsonDocument(invalidTopologyVersionDocument);

            subject.Should().BeNull();
        }
Beispiel #2
0
        public void FromBsonDocument_should_return_TopologyDescription_when_supplied_valid_BsonDocument()
        {
            var processId = ObjectId.Empty;
            var counter   = 31L;
            var topologyVersionDocument = new BsonDocument {
                { "processId", processId }, { "counter", counter }
            };

            TopologyVersion subject = TopologyVersion.FromBsonDocument(topologyVersionDocument);

            subject.Should().NotBeNull();
        }