Skip to content

Commit ab5cac7

Browse files
committed
Merge pull request #87 from asbjornu/master
Added readme file and tweaked RakeFile
2 parents cc57cf2 + f0c7399 commit ab5cac7

16 files changed

+175
-125
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<img src="http://fluentnhibernate.org/images/logo.png" alt="Fluent NHibernate - Fluent mapping for your model" />
2+
=============================================
3+
4+
Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate. *Get your fluent on.*
5+
6+
7+
Getting started
8+
---------------------------------------------
9+
10+
* Read the [introduction](http://wiki.fluentnhibernate.org/Getting_started).
11+
* Create your [first project](http://wiki.fluentnhibernate.org/Getting_started#Your_first_project).
12+
13+
14+
Further reading
15+
---------------------------------------------
16+
17+
Once you've followed the above, you can compare our [auto mapping](http://wiki.fluentnhibernate.org/Auto_mapping) to our <a [fluent interface](http://wiki.fluentnhibernate.org/Fluent_mapping) to see which suits your application, read through our [API documentation](http://fluentnhibernate.org/api/index.htm), or just see what's available for reading in our [wiki](http://wiki.fluentnhibernate.org).
18+
19+
20+
Contributors
21+
---------------------------------------------
22+
23+
Fluent NHibernate wouldn't be possible without the time and effort of its contributors. The team comprises of [James Gregory](http://jagregory.com), [Paul Batum](http://www.paulbatum.com), Andrew Stewart, and [Hudson Akridge](http://www.bestguesstheory.com).
24+
25+
**Our valued committers are:** Aaron Jensen, Alexander Gross, Andrew Stewart, Barry Dahlberg, Bobby Johnson, Brian Donahue, Cameron Harris, Chad Myers, Chris Chilvers, Craig Neuwirt, Dan Malcolm, Daniel Mirapalheta, David Archer, David Longnecker, David R. Longnecker, Derick Bailey, Erik Ojebo, Firo, Hudson Akridge, Ivan Zlatev, James Freiwirth, James Gregory, James Kovacs, Jeremy Skinner, Lee Henson, Louis DeJardin, Patric Forsgard, Paul Batum, Roelof Blom, Stuart Childs, Tom Janssens, Tuna Toksoz, U-BSOD\pruiz, di97mni, dschilling, felixg, jeremydmiller, kevm, leebrandt, maxild, and robsosno.</p>
26+
27+
Thanks goes to [Jeremy Miller](http://codebetter.com/blogs/jeremy.miller) for the original idea and implementation.
28+
29+
Fluent NHibernate is &copy; 2008-2011 [James Gregory](http://jagregory.com) and contributors under the [BSD license](fluent-nhibernate/blob/master/LICENSE.txt)

RakeFile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'fileutils'
2-
gem 'albacore', '=0.2.4'
2+
gem 'albacore', '> 0.2.4'
33
require 'albacore'
4-
require 'tools/albacore/nuspec_patch'
4+
require './tools/albacore/nuspec_patch'
55

66
NH_VERSION = '3.x'
77

src/FluentNHibernate.Specs/Diagnostics/Registration_diagnostics_specs.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public class when_registering_types_with_diagnostics_enabled
1414
{
1515
Establish context = () =>
1616
{
17-
var despatcher = new DefaultDiagnosticMessageDespatcher();
18-
despatcher.RegisterListener(new StubListener(x => results = x));
17+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
18+
dispatcher.RegisterListener(new StubListener(x => results = x));
1919

2020
model = new FluentNHibernate.PersistenceModel();
21-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
21+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
2222
};
2323

2424
Because of = () =>
@@ -56,11 +56,11 @@ public class when_registering_conventions_with_diagnostics_enabled
5656
{
5757
Establish context = () =>
5858
{
59-
var despatcher = new DefaultDiagnosticMessageDespatcher();
60-
despatcher.RegisterListener(new StubListener(x => results = x));
59+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
60+
dispatcher.RegisterListener(new StubListener(x => results = x));
6161

6262
model = new FluentNHibernate.PersistenceModel();
63-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
63+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
6464
};
6565

6666
Because of = () =>
@@ -92,12 +92,12 @@ public class when_automapping_with_diagnostics_enabled
9292
{
9393
Establish context = () =>
9494
{
95-
var despatcher = new DefaultDiagnosticMessageDespatcher();
96-
despatcher.RegisterListener(new StubListener(x => results = x));
95+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
96+
dispatcher.RegisterListener(new StubListener(x => results = x));
9797

9898
model = AutoMap.Source(new StubTypeSource(typeof(First), typeof(Second), typeof(Third)), new TestAutomappingConfiguration());
9999

100-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
100+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
101101
};
102102

103103
Because of = () =>
@@ -137,13 +137,13 @@ public class when_automapping_with_diagnostics_enabled_and_excluding_by_where
137137
{
138138
Establish context = () =>
139139
{
140-
var despatcher = new DefaultDiagnosticMessageDespatcher();
141-
despatcher.RegisterListener(new StubListener(x => results = x));
140+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
141+
dispatcher.RegisterListener(new StubListener(x => results = x));
142142

143143
model = AutoMap.Source(new StubTypeSource(typeof(First), typeof(Second), typeof(Third)))
144144
.Where(x => x != typeof(First));
145145

146-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
146+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
147147
};
148148

149149
Because of = () =>
@@ -175,13 +175,13 @@ public class when_automapping_with_diagnostics_enabled_and_excluding_by_IgnoreBa
175175
{
176176
Establish context = () =>
177177
{
178-
var despatcher = new DefaultDiagnosticMessageDespatcher();
179-
despatcher.RegisterListener(new StubListener(x => results = x));
178+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
179+
dispatcher.RegisterListener(new StubListener(x => results = x));
180180

181181
model = AutoMap.Source(new StubTypeSource(typeof(First), typeof(Second), typeof(Third)))
182182
.IgnoreBase<First>();
183183

184-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
184+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
185185
};
186186

187187
Because of = () =>
@@ -213,13 +213,13 @@ public class when_automapping_with_diagnostics_enabled_and_excluding_by_generic_
213213
{
214214
Establish context = () =>
215215
{
216-
var despatcher = new DefaultDiagnosticMessageDespatcher();
217-
despatcher.RegisterListener(new StubListener(x => results = x));
216+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
217+
dispatcher.RegisterListener(new StubListener(x => results = x));
218218

219219
model = AutoMap.Source(new StubTypeSource(typeof(Something<First>), typeof(Second), typeof(Third)))
220220
.IgnoreBase(typeof(Something<>));
221221

222-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
222+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
223223
};
224224

225225
Because of = () =>
@@ -251,12 +251,12 @@ public class when_automapping_with_diagnostics_enabled_and_excluding_by_layer_su
251251
{
252252
Establish context = () =>
253253
{
254-
var despatcher = new DefaultDiagnosticMessageDespatcher();
255-
despatcher.RegisterListener(new StubListener(x => results = x));
254+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
255+
dispatcher.RegisterListener(new StubListener(x => results = x));
256256

257257
model = AutoMap.Source(new StubTypeSource(typeof(Abstract), typeof(Second), typeof(Third)), new TestAutomappingConfiguration());
258258

259-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
259+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
260260
};
261261

262262
Because of = () =>
@@ -296,12 +296,12 @@ public class when_automapping_with_diagnostics_enabled_and_excluding_by_explicit
296296
{
297297
Establish context = () =>
298298
{
299-
var despatcher = new DefaultDiagnosticMessageDespatcher();
300-
despatcher.RegisterListener(new StubListener(x => results = x));
299+
var dispatcher = new DefaultDiagnosticMessageDispatcher();
300+
dispatcher.RegisterListener(new StubListener(x => results = x));
301301

302302
model = AutoMap.Source(new StubTypeSource(typeof(Component), typeof(Second), typeof(Third)), new TestAutomappingConfiguration());
303303

304-
model.SetLogger(new DefaultDiagnosticLogger(despatcher));
304+
model.SetLogger(new DefaultDiagnosticLogger(dispatcher));
305305
};
306306

307307
Because of = () =>

src/FluentNHibernate.Testing/Diagnostics/DiagnosticConfigurationTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,37 @@ public void disabling_should_set_logger_to_null_impl()
3131
}
3232

3333
[Test]
34-
public void adding_listener_should_add_listener_to_underlying_despatcher()
34+
public void adding_listener_should_add_listener_to_underlying_dispatcher()
3535
{
36-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
36+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
3737
var listener = Stub<IDiagnosticListener>.Create();
3838

39-
new DiagnosticsConfiguration(despatcher, l => { })
39+
new DiagnosticsConfiguration(dispatcher, l => { })
4040
.RegisterListener(listener);
4141

42-
despatcher.AssertWasCalled(x => x.RegisterListener(listener));
42+
dispatcher.AssertWasCalled(x => x.RegisterListener(listener));
4343
}
4444

4545
[Test]
4646
public void output_to_console_should_register_console_listener()
4747
{
48-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
48+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
4949

50-
new DiagnosticsConfiguration(despatcher, l => { })
50+
new DiagnosticsConfiguration(dispatcher, l => { })
5151
.OutputToConsole();
5252

53-
despatcher.AssertWasCalled(x => x.RegisterListener(Arg<ConsoleOutputListener>.Is.TypeOf));
53+
dispatcher.AssertWasCalled(x => x.RegisterListener(Arg<ConsoleOutputListener>.Is.TypeOf));
5454
}
5555

5656
[Test]
5757
public void output_to_file_should_register_console_listener()
5858
{
59-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
59+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
6060

61-
new DiagnosticsConfiguration(despatcher, l => { })
61+
new DiagnosticsConfiguration(dispatcher, l => { })
6262
.OutputToFile("path");
6363

64-
despatcher.AssertWasCalled(x => x.RegisterListener(Arg<FileOutputListener>.Is.TypeOf));
64+
dispatcher.AssertWasCalled(x => x.RegisterListener(Arg<FileOutputListener>.Is.TypeOf));
6565
}
6666
}
6767
}

src/FluentNHibernate.Testing/Diagnostics/DiagnosticLoggerTests.cs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,39 @@ namespace FluentNHibernate.Testing.Diagnostics
1212
public class DiagnosticLoggerTests
1313
{
1414
[Test]
15-
public void should_not_flush_messages_to_despatcher_when_no_messages_logged()
15+
public void should_not_flush_messages_to_dispatcher_when_no_messages_logged()
1616
{
17-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
18-
var logger = new DefaultDiagnosticLogger(despatcher);
17+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
18+
var logger = new DefaultDiagnosticLogger(dispatcher);
1919

2020
logger.Flush();
2121

22-
despatcher.AssertWasNotCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything));
22+
dispatcher.AssertWasNotCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything));
2323
}
2424

2525
[Test]
26-
public void should_flush_messages_to_despatcher()
26+
public void should_flush_messages_to_dispatcher()
2727
{
28-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
29-
var logger = new DefaultDiagnosticLogger(despatcher);
28+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
29+
var logger = new DefaultDiagnosticLogger(dispatcher);
3030

3131
logger.FluentMappingDiscovered(typeof(SomeClassMap));
3232
logger.Flush();
3333

34-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything));
34+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything));
3535
}
3636

3737
[Test]
3838
public void should_add_class_maps_to_result()
3939
{
40-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
41-
var logger = new DefaultDiagnosticLogger(despatcher);
40+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
41+
var logger = new DefaultDiagnosticLogger(dispatcher);
4242

4343
logger.FluentMappingDiscovered(typeof(SomeClassMap));
4444
logger.Flush();
4545

4646
DiagnosticResults result = null;
47-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
47+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
4848
c => c.Callback<DiagnosticResults>(x =>
4949
{
5050
result = x;
@@ -57,14 +57,14 @@ public void should_add_class_maps_to_result()
5757
[Test]
5858
public void should_add_conventions_to_result()
5959
{
60-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
61-
var logger = new DefaultDiagnosticLogger(despatcher);
60+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
61+
var logger = new DefaultDiagnosticLogger(dispatcher);
6262

6363
logger.ConventionDiscovered(typeof(SomeConvention));
6464
logger.Flush();
6565

6666
DiagnosticResults result = null;
67-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
67+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
6868
c => c.Callback<DiagnosticResults>(x =>
6969
{
7070
result = x;
@@ -77,14 +77,14 @@ public void should_add_conventions_to_result()
7777
[Test]
7878
public void should_add_scanned_fluent_mapping_sources_to_result()
7979
{
80-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
81-
var logger = new DefaultDiagnosticLogger(despatcher);
80+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
81+
var logger = new DefaultDiagnosticLogger(dispatcher);
8282

8383
logger.LoadedFluentMappingsFromSource(new StubTypeSource());
8484
logger.Flush();
8585

8686
DiagnosticResults result = null;
87-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
87+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
8888
c => c.Callback<DiagnosticResults>(x =>
8989
{
9090
result = x;
@@ -100,14 +100,14 @@ public void should_add_scanned_fluent_mapping_sources_to_result()
100100
[Test]
101101
public void should_add_scanned_convention_sources_to_result()
102102
{
103-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
104-
var logger = new DefaultDiagnosticLogger(despatcher);
103+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
104+
var logger = new DefaultDiagnosticLogger(dispatcher);
105105

106106
logger.LoadedConventionsFromSource(new StubTypeSource());
107107
logger.Flush();
108108

109109
DiagnosticResults result = null;
110-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
110+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
111111
c => c.Callback<DiagnosticResults>(x =>
112112
{
113113
result = x;
@@ -123,14 +123,14 @@ public void should_add_scanned_convention_sources_to_result()
123123
[Test]
124124
public void should_add_skipped_automap_types_to_result()
125125
{
126-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
127-
var logger = new DefaultDiagnosticLogger(despatcher);
126+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
127+
var logger = new DefaultDiagnosticLogger(dispatcher);
128128

129129
logger.AutomappingSkippedType(typeof(object), "reason");
130130
logger.Flush();
131131

132132
DiagnosticResults result = null;
133-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
133+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
134134
c => c.Callback<DiagnosticResults>(x =>
135135
{
136136
result = x;
@@ -148,14 +148,14 @@ public void should_add_skipped_automap_types_to_result()
148148
[Test]
149149
public void should_add_automapping_candidates()
150150
{
151-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
152-
var logger = new DefaultDiagnosticLogger(despatcher);
151+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
152+
var logger = new DefaultDiagnosticLogger(dispatcher);
153153

154154
logger.AutomappingCandidateTypes(new[] { typeof(object) });
155155
logger.Flush();
156156

157157
DiagnosticResults result = null;
158-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
158+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
159159
c => c.Callback<DiagnosticResults>(x =>
160160
{
161161
result = x;
@@ -169,14 +169,14 @@ public void should_add_automapping_candidates()
169169
[Test]
170170
public void should_add_automapping_type_with_begin()
171171
{
172-
var despatcher = Mock<IDiagnosticMessageDespatcher>.Create();
173-
var logger = new DefaultDiagnosticLogger(despatcher);
172+
var dispatcher = Mock<IDiagnosticMessageDispatcher>.Create();
173+
var logger = new DefaultDiagnosticLogger(dispatcher);
174174

175175
logger.BeginAutomappingType(typeof(object));
176176
logger.Flush();
177177

178178
DiagnosticResults result = null;
179-
despatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
179+
dispatcher.AssertWasCalled(x => x.Publish(Arg<DiagnosticResults>.Is.Anything),
180180
c => c.Callback<DiagnosticResults>(x =>
181181
{
182182
result = x;

0 commit comments

Comments
 (0)