コード例 #1
0
        public void ChangeValueFact()
        {
            // Arrange
            var name     = AutoFixture.String();
            var oldValue = Guid.NewGuid();
            var newValue = Guid.NewGuid();
            var document = new BsonDocument(new BsonElement(name, oldValue));

            // Act
            document.ChangeValue(name, newValue);
            var result = document.GetValue(name);

            // Assert
            result.Should().Be(newValue);
        }
コード例 #2
0
 protected override void DowngradeDocument(BsonDocument document)
 {
     document.ChangeValue("IsActive", true);
 }
コード例 #3
0
 protected override void DowngradeDocument(BsonDocument document)
 {
     document.ChangeValue("Kind", "Cat");
 }
コード例 #4
0
 protected override void UpgradeDocument(BsonDocument document)
 {
     document.ChangeValue("IsActive", false);
 }
コード例 #5
0
 protected override void UpgradeDocument(BsonDocument document)
 {
     document.ChangeValue("Kind", "Dog");
 }