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
// Karma configuration | |
// Generated on Fri Feb 07 2014 14:46:59 GMT+0100 (Romansk (normaltid)) | |
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '', | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 abstract class BDD<T> where T : BDD<T> | |
{ | |
protected T Given { get { return (T)this; } } | |
protected T When { get { return (T)this; } } | |
protected T Then { get { return (T)this; } } | |
protected T And { get { return (T)this; } } | |
} |
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
[TestMethod] | |
public void Fires_event_when_recording_is_complete() | |
{ | |
string filename = null; | |
viewModel.RecordingComplete += (o, e) => filename = e.Filename; | |
viewModel.RecordingCommand.Execute(null); // Start recording | |
viewModel.RecordingCommand.Execute(null); // Stop recording | |
Assert.IsNotNull(filename, "Should fire event when recording is complete."); |
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
<UserControl x:Class="UsercontrolContentControl.Overlay" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Width="400" Height="300"> | |
<Grid x:Name="LayoutRoot" Background="White"> | |
<ContentControl Content="{Binding OverlayContent}" /> | |
</Grid> | |
</UserControl> | |
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
namespace BlackBox.CodeGeneration | |
{ | |
public class TestFlavour | |
{ | |
public string Namespace { get; private set;} | |
public string TestAttribute { get; private set; } | |
public string ClassAttribute { get; private set; } | |
public string SetupAttribute { get; private set; } | |
public bool ConstructorAsSetup() |
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 AirlineNamesService | |
{ | |
private readonly Uri _serviceUrl; | |
public AirlineNamesService() | |
{ | |
_serviceUrl = new Uri("http://flydata.avinor.no/airlineNames.asp"); | |
} | |
public IObservable<Airline> GetAirlines() |
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
// Tiniest BDD DSL/framework around? | |
// Licensed under MSPL/FreeBSD/ISC or any other OSS license you want | |
// Original idea from http://blog.kjempekjekt.com/2009/08/13/ultra-tiny-given-when-then-dsl-snippet/, | |
// turned into generic base class by Jonas Follesø. | |
public abstract class BDD<T> where T : BDD<T> | |
{ | |
protected T Given { get { return (T)this; } } | |
protected T And { get { return (T)this; } } | |
protected T When { get { return (T)this; } } |
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
[TestClass] | |
public class XmlFormatDetectorTest : BDDTest<XmlFormatDetectorTest> | |
{ | |
[TestMethod] | |
public void Detects_that_a_file_follows_the_FHNBransjestandard1_format() | |
{ | |
Given.we_got_a_file("FNHBransjestandard1.xml"); | |
When.we_try_to_detect_the_file_format(); | |
Then.fileformat.ShouldBe(KnownFileFormats.FNHBransjestandard1); | |
} |
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
using System.Collections; | |
using System.Collections.Generic; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace KS.Bestandsrapportering.TestInfrastruktur | |
{ | |
public static class TestExtensions | |
{ | |
public static void SkalVæreLik(this object valueToTest, object expected) | |
{ |
OlderNewer