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 DisplayNameByResourceKeyAttribute : DisplayNameAttribute | |
{ | |
public DisplayNameByResourceKeyAttribute(string resourceKey) | |
{ | |
DisplayNameValue = DisplayNameByResourceKey(resourceKey) ?? resourceKey; | |
} | |
private static string DisplayNameByResourceKey(string value) | |
{ | |
return null; |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication3 | |
{ | |
class Program2 | |
{ |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication4 | |
{ | |
class Program | |
{ |
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
/* | |
http://ilker.de/code-kata-pickakin | |
akinList = [A1,B2,A2,A3,B3,A4,D1,D2,B1] | |
ceoList = [C1,E1,E2] | |
controlList = [F1] | |
*/ | |
var ceoListOriginal = new List<string>() {"A1", "B1", "A2", "A3", "C1", "D1", "E1", "E2"}; |
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 ViewModelField<T> : INotifyPropertyChanged | |
{ | |
private T _value; | |
public T Value | |
{ | |
get { return _value; } | |
set | |
{ | |
_value = value; | |
PropertyChanged(this, new PropertyChangedEventArgs("Value")); |
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
require 'rake' | |
require './transform_mspec_report' | |
desc "Done..." | |
task :default => [:mspec, :transform] do | |
puts "Done..." | |
end | |
desc "Generate MSpec test report." | |
task :mspec do |
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
require "nokogiri" | |
class TransformMSpecReport | |
def self.transform() | |
doc = Nokogiri::XML(File.read('test_result.xml')) | |
xslt = Nokogiri::XSLT(File.read('mSpec2JUnit.xslt')) | |
doc = xslt.transform(doc) | |
File.open('test_result_junit.xml', 'w') {|f| f.write(doc) } | |
puts "File transformed." | |
end |
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
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" indent="yes"/> | |
<xsl:variable name="specs" select="//specification"/> | |
<xsl:template match="MSpec"> | |
<testsuite | |
name="Specifications" | |
tests="{count($specs)}" | |
errors="0" |
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; | |
using System.Reactive.Linq; | |
using Minimod.MessageProcessor; | |
using Minimod.ZeroMqMessageStream; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
var sut = Observable.Start(() => | |
{ | |
return "Demo"; | |
}); | |
var testScheduler = new Microsoft.Reactive.Testing.TestScheduler(); | |
var actual = testScheduler.Start(() => sut); | |
Microsoft.Reactive.Testing.ReactiveAssert.AreElementsEqual(actual.Messages, new[] { | |
new Recorded<Notification<string>>(200, Notification.CreateOnNext("Demo")), |
OlderNewer