This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void should_register_type_as_single_implementation() | |
{ | |
Scan(ac => | |
{ | |
ac.AssemblyContainingType<ISingleInterface>(); | |
ac.SingleImplementationsOfInterface(); | |
}); | |
shouldHaveFamily<ISingleInterface>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Choose a ticket class: <select id="tickets"></select> | |
<p id="ticketOutput"></p> | |
<script id="ticketTemplate" type="text/x-jquery-tmpl"> | |
{{if chosenTicket}} | |
You have chosen <b>${ chosenTicket().name }</b> | |
($${ chosenTicket().price }) | |
<button data-bind="click: resetTicket">Clear</button> | |
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Customer | |
{ | |
public int Id { get; set; } | |
public ICollection<Order> Orders { get; set; } | |
} | |
public class BigBoss | |
{ | |
public string FullName { get; set; } | |
public ICollection<OrderInfo> Orders { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product | |
{ | |
public int ProductId { get; set; } | |
} | |
class SpecialProduct : Product | |
{ | |
public ICollection<Option> Options { get; set;} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tbody data-bind="foreach: competences"> | |
<tr> | |
<td data-bind="attr: { colspan: $root.scales().length + 2 }">Competence"<b data-bind="text: name"></b>"</td> | |
<!-- ko foreach: results --> | |
<tr> | |
<td><span data-bind="text: indicatorNegativeDisplay"></span></td> | |
<!-- ko foreach: $root.scales --> | |
<td> | |
<label data-bind="text: numericValue"></label> | |
<input type="radio" name="" data-bind="value: numericValue, checked: $parent.selectedScale"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class when_specifying_component_convention | |
{ | |
Establish context = () => | |
{ | |
model = new FluentNHibernate.PersistenceModel(); | |
model.Conventions.Add<ComponentConvention>(); | |
model.Add(new EntityWithComponentMap()); | |
model.Add(new AddressMap()); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class when_car_was_stolen: claim_fixture | |
{ | |
Because of = () => | |
{ | |
model.Risk = RiskTypes.Theft; | |
responsibleGuid = responsibleId; | |
workitemRepo.Setup(x => x.Add(MockIt.Is<SendEmailWorkItem>(wi => wi.ResponsibleId == responsibleGuid))).Verifiable(); | |
workitemRepo.Setup(x => x.Add(MockIt.Is<WorkItem>(wi => wi.TaskType == (int)TaskTypes.CreateClaim && wi.ResponsibleId == responsibleGuid))).Verifiable(); | |
controller.DamageClaim(model); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ArticleListMap : SubclassMap<Article> | |
{ | |
ArticleListMap() | |
{ | |
DiscriminatorValue(1); | |
} | |
} | |
public class ArticleMap : SubclassMap<Article> | |
{ | |
ArticleMap() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestClass | |
{ | |
private decimal myField; | |
public virtual int Id { get; set; } | |
public virtual string Name { get; set; } | |
public virtual void SetField(decimal newOne) | |
{ | |
myField = newOne; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<joined-subclass name="FluentNHibernate.Testing.FluentInterfaceTests.Image, FluentNHibernate.Testing, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" table="[ImageInfo]"> | |
<key> | |
<column name="[Guid]" /> | |
</key> | |
.... | |
<property access="field.camelcase" name="Contexts" type="FluentNHibernate.Testing.FluentInterfaceTests.ImageContextsUserType, FluentNHibernate.Testing, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null"> | |
<column name="IsIcon" not-null="true" /> | |
<column name="IsPromo" not-null="true" /> | |
<column name="IsWallpaper" not-null="true" /> | |
<column name="IsPlaceholder" not-null="true" /> |
OlderNewer