forked from ravendb/ravendb
/
NullableValuesRemote.cs
43 lines (38 loc) · 1 KB
/
NullableValuesRemote.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// //-----------------------------------------------------------------------
// // <copyright company="Hibernating Rhinos LTD">
// // Copyright (c) Hibernating Rhinos LTD. All rights reserved.
// // </copyright>
// //-----------------------------------------------------------------------
using Raven.Client.Document;
using Xunit;
using System.Linq;
namespace Raven.Tests.Bugs
{
public class NullableValuesRemote : RemoteClientTest
{
[Fact]
public void CanGetNullableDoubleAndInt()
{
using (GetNewServer())
using (var documentStore = new DocumentStore {Url = "http://localhost:8080/"}.Initialize())
{
using(var s = documentStore.OpenSession())
{
s.Store(new WithNullables{D = null, I = null});
s.SaveChanges();
}
using(var s = documentStore.OpenSession())
{
s.Query<WithNullables>().ToList();
}
}
}
#region Nested type: WithNullables
public class WithNullables
{
public double? D { get; set; }
public int? I { get; set; }
}
#endregion
}
}