This file contains hidden or 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_a_message_header_is_parsed : With_message_and_parser | |
{ | |
Establish_multiple contexts = () => new Action[] | |
{ | |
() => | |
{ | |
Message = Load("Messages\\One level, empty quote prefix.txt"); | |
Parser = new MessageParser(" "); | |
}, | |
() => |
This file contains hidden or 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_a_message_header_with_a_prefix_is_parsed : With_message_and_parser | |
{ | |
Establish context = () => | |
{ | |
Message = Load("Messages\\One level.txt"); | |
Parser = new MessageParser("| "); | |
}; | |
} | |
public class When_a_message_header_with_no_prefix_is_parsed : With_message_and_parser |
This file contains hidden or 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_a_message_header_with_an_empty_prefix_is_parsed : With_message_and_parser | |
{ | |
static When_a_message_header_with_an_empty_prefix_is_parsed() | |
{ | |
FileName = "Messages\\One level, empty quote prefix.txt"; | |
} | |
} | |
public abstract class With_message_and_parser | |
{ |
This file contains hidden or 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; | |
namespace Machine.Specifications.Specs | |
{ | |
public class when_a_date_is_parsed_with_the_regular_expression_parser : with_string_parser | |
{ | |
Establish context = () => { Parser = new RegexParser(); }; | |
It_should_behave_like a_date_time_parser = () => new DateTimeParsingBehavior(); | |
} |
This file contains hidden or 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 with_string_parser | |
{ | |
protected static DateTime ParsedDate; | |
protected static IParser Parser; | |
protected Because of = () => { ParsedDate = Parser.Parse("2009/01/21"); }; | |
} | |
public class when_a_date_is_parsed_by_the_infrastructure : with_string_parser | |
{ |
This file contains hidden or 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 virtual void SetShippedQuantityFor(Operation operation, int shippedQuantity) | |
{ | |
Ensure.Argument("operation").IsNotNull(operation); | |
// Update the passed and all remaining operations with the new quantity. | |
OperationSequence.SkipWhile(o => o != operation).Each(o => o.SetShippedQuantity(shippedQuantity)); | |
} |
This file contains hidden or 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.Linq.Expressions; | |
namespace Indigo.Tools | |
{ | |
public static class Ensure | |
{ | |
public static ThrowingValidator Argument(string argument) | |
{ | |
return new ThrowingValidator(argument); |
This file contains hidden or 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 Indigo.ForTesting; | |
using Machine.Specifications; | |
namespace Indigo.Tools.Tests | |
{ | |
[Behaviors] | |
public class ArgumentNullExceptionBehavior |
This file contains hidden or 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 Indigo.Runtime.Persistence; | |
using Machine.Specifications; | |
using NHibernate; | |
using NHibernate.Cfg; | |
using Rhino.Mocks; | |
namespace Indigo.Runtime.Tests.Persistence |
This file contains hidden or 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.Diagnostics; | |
using System.Threading; | |
using Indigo.ForTesting; | |
using Machine.Specifications; | |
namespace Indigo.Tools.Tests | |
{ |
OlderNewer