Example #1
0
 public BsonMongoDBSerializeTest()
 {
     QowaivBsonConverter.RegisterType <SvoThatThrows>();
     QowaivBsonConverter.RegisterType <SvoWithFromJson>();
     QowaivBsonConverter.RegisterType <SvoWithFromJsonClass>();
     QowaivBsonConverter.RegisterType <SvoWithFromJsonStringOnly>();
     QowaivBsonConverter.RegisterType <Identifiers.Id <ForGeneric> >();
 }
Example #2
0
 public void RegisterTypeGeneric_Int_Throws()
 {
     Assert.Throws <NotSupportedException>(() => QowaivBsonConverter.RegisterType <int>());
 }
Example #3
0
 public void RegisterType_Int_Throws()
 {
     Assert.Throws <NotSupportedException>(() => QowaivBsonConverter.RegisterType(typeof(int)));
 }
Example #4
0
        public void RegisterAssembly_Qowaiv_SerializesSvoFromAssembly()
        {
            QowaivBsonConverter.RegisterAssembly(typeof(Date).Assembly);

            Assert.AreEqual(@"""2017-06-11""", TestSerializer.BsonSerialize(new Date(2017, 06, 11)));
        }