Exemplo n.º 1
0
        public void it_can_save_the_entity_so_that_it_is_queryable_by_key()
        {
            // Arrange
            var objId = new ObjectId();
            var fake = new MongoEntityFake { EntityId = objId, Name = "Test" };

            // Act
            _repo.Add(fake);
            var result = _repo.FindOneById(objId.ToString());

            // Assert
            result.Should().NotBeNull();
            result.Should().BeOfType<MongoEntityFake>();
        }
Exemplo n.º 2
0
 /// <summary>Equalses the specified other.</summary>
 /// <param name="other">The other.</param>
 /// <returns>The equals.</returns>
 public bool Equals(ObjectId other)
 {
     return other != null && ToString() == other.ToString();
 }