Skip to content

Instantly share code, notes, and snippets.

@davidroberts63
davidroberts63 / WebApp.xml
Created April 9, 2013 21:32
Sample Nant build file for use with MSBuild to package a Web Application. Some detail were found on Octopus Deploy around the OctoPack tool
<!-- This is from a Nant File with the following properties defined
msbuild.target = Debug | Release
scratch.path = Path\for\some\temporary\folder\for\build\to\go\to
publish.path = Path\where\you\want\the\resulting\zip\or\package\to\end\up
Be sure the OutDir ends with a slash (escaped in this case) otherwise msbuild complains.
OutputPath must NOT have a trailing slash.
WebUI = This is just what I have in the sample, change it to whatever you want for the web ui stuff to go to. This is where your configs and Views will get put, then the bins under that.
@davidroberts63
davidroberts63 / gist:4653491
Last active December 11, 2015 20:09
RavenDB Embedded not storing object when querying for the same object type but none of that type object has been stored before. [NUnit]
[Test]
public void Session_should_store_object_after_querying_same_type_object_that_has_never_been_stored_before()
{
// Arrange
// RavenDB from NUget package: RavenDB.Embedded 2.0.2230
// Raven.Clien.Embedded.dll Product Version: 2.0.0 / 08aa244
var ravenStore = new EmbeddableDocumentStore() { RunInMemory = true };
ravenStore.Initialize();
// Act
@davidroberts63
davidroberts63 / DateDescriptor.cs
Created November 16, 2012 05:59
Example use of NUnit TestCase
[TestCase(0, "Date1", DateTimeFeature.Day)]
[TestCase(1, "Date2", DateTimeFeature.Day | DateTimeFeature.Year)]
public void Test_Good_Date_Descriptor(int featureIndex, string name, DateTimeFeature feature)
{
var desc = Descriptor.Create<FakeDate>();
Assert.AreEqual(name, desc.Features[featureIndex].Name);
Assert.AreEqual(new DateTimeProperty(feature).Features == ((DateTimeProperty)desc.Features[featureIndex]).Features);
}
@davidroberts63
davidroberts63 / gist:3723644
Created September 14, 2012 18:12
Superb NServiceBus exception message
'InputQueue' entry in 'MsmqTransportConfig' section is obsolete.
By default the queue name is taken from the class namespace where
the configuration is declared. To override it, use .DefineEndpointName()
with either a string parameter as queue name or Func<string> parameter
that returns queue name. In this instance, 'Sample.UI' is defined as queue name.