public BsonMongoDBSerializeTest() { QowaivBsonConverter.RegisterType <SvoThatThrows>(); QowaivBsonConverter.RegisterType <SvoWithFromJson>(); QowaivBsonConverter.RegisterType <SvoWithFromJsonClass>(); QowaivBsonConverter.RegisterType <SvoWithFromJsonStringOnly>(); QowaivBsonConverter.RegisterType <Identifiers.Id <ForGeneric> >(); }
public void RegisterTypeGeneric_Int_Throws() { Assert.Throws <NotSupportedException>(() => QowaivBsonConverter.RegisterType <int>()); }
public void RegisterType_Int_Throws() { Assert.Throws <NotSupportedException>(() => QowaivBsonConverter.RegisterType(typeof(int))); }
public void RegisterAssembly_Qowaiv_SerializesSvoFromAssembly() { QowaivBsonConverter.RegisterAssembly(typeof(Date).Assembly); Assert.AreEqual(@"""2017-06-11""", TestSerializer.BsonSerialize(new Date(2017, 06, 11))); }