-
Notifications
You must be signed in to change notification settings - Fork 7
/
when_persisting_list_with_breaking_documents.cs
34 lines (29 loc) · 1.46 KB
/
when_persisting_list_with_breaking_documents.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
using System.Linq;
using Machine.Specifications;
using Newtonsoft.Json.Linq;
using Relax.Config;
using Relax.Impl;
using StructureMap;
using Symbiote.Core.Extensions;
namespace Relax.Tests.Commands.SaveCommand
{
class when_persisting_list_with_breaking_documents : with_nested_document_list
{
protected static object[] result;
protected static string serialized;
private Because of = () =>
{
var configuration = ObjectFactory.GetInstance<ICouchConfiguration>();
configuration.BreakDownDocumentGraphs = true;
result = testDocs.GetDocmentsFromGraph();
serialized = result[0].ToJson();
};
private It should_produce_eight_documents_total = () =>
result.Length.ShouldEqual(8);
private It should_not_include_children_property_in_json = () =>
{
var json = JObject.Parse(serialized);
ShouldExtensionMethods.ShouldNotContain(json.Properties().Select(x => x.Name), "Children");
};
}
}