My favorites | Sign in
Project Home Downloads Issues Source
Checkout   Browse   Changes    
 
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#region Copyright (C) 2011 by Pavel Savara

/*
This file is part of polyglottos library - code generator tool
http://code.google.com/p/polyglottos/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#endregion

// ReSharper disable ConvertToLambdaExpression

using System;
using System.Xml.Linq;
using demomodel;
using NUnit.Framework;
using polyglottos.fluentator;

namespace polyglottos.test
{

[TestFixture]
public class XsdFluentatorTest
{
[Test]
public void TestXSDFluentator()
{
var rf = new XsdFluentator();

rf.GenerateFluentAPI(XDocument.Load(@"..\..\DemoModel\library.xsd"), "demomodel", @"..\..\DemoModel");
}

[Test]
public void TestLibraryBuilder()
{
var doc=new XDocument();
doc.AddLibrary("Prague",prague =>
{
prague.AddBook("Saturnin",saturnin =>
{
saturnin.AddAuthor("Zdenek Jirotka");
});
prague.AddBook("Bylo Nas 5", saturnin =>
{
saturnin.AddAuthor("Karel Polacek");
});
});
Console.WriteLine(doc);
}
}
}

Change log

r37 by pavel.savara on Jan 1, 2012   Diff
write only is the files are different
Go to: 
Project members, sign in to write a code review

Older revisions

r30 by pavel.savara on Dec 31, 2011   Diff
fluentator refactoring
All revisions of this file

File info

Size: 1864 bytes, 63 lines
Powered by Google Project Hosting