public Type GetActualType(IBsonReader bsonReader, Type nominalType)
        {
            var bookmark = bsonReader.GetBookmark();

            bsonReader.ReadStartDocument();
            var t = nominalType;

            if (bsonReader.FindElement(ElementName))
            {
                var raw           = bsonReader.ReadString();
                var discriminator = _discriminatorMapper.Discriminator(raw);
                t = _discriminatorMapper.ConcreteType(discriminator);
            }
            bsonReader.ReturnToBookmark(bookmark);
            return(t);
        }
 protected void AssertGetsConcreteType <T>(TDiscriminator discriminator)
 {
     Assert.AreEqual(typeof(T), Mapper.ConcreteType(discriminator));
 }