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
[Test] | |
public void Decimal_Values_Are_Not_Truncated_Once_Saved() | |
{ | |
var entity = new DecimalEntity | |
{ | |
SimpleDecimal = 1.1m, | |
SimpleDouble = 1.2d, | |
NullableDecimal = 1.3m, | |
NullableDouble = 1.4d | |
}; |
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 IEnumerable<IResult> LoadLookupCache() | |
{ | |
yield return ProgressResult.Show("Loading Cache..."); | |
var masterDataService = new MasterDataServiceClient(); | |
var therapyService = new TherapyServiceClient(); | |
masterDataService.getAllHealthFundsCompleted += (o, e) => _serviceHandler.AddTo(e, _lookups.HealthFunds); | |
masterDataService.getAllPatientCompleted += (o, e) => _serviceHandler.AddTo(e, _lookups.Patients); | |
therapyService.getTherapyTypesCompleted += (o, e) => _serviceHandler.AddTo(e, _lookups.TherapyTemplateTypes).Apply(x => x.Type = TemplateTypes.Therapy); |
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
protected static short[] yyTable = { 31, | |
19, 15, 72, 32, 70, 73, 112, 69, 113, 47, | |
3, 4, 67, 66, 33, 65, 69, 68, 92, 18, | |
93, 67, 69, 64, 34, 43, 68, 67, 66, 35, | |
65, 74, 68, 123, 75, 36, 124, 19, 19, 30, | |
87, 19, 19, 19, 19, 19, 37, 19, 114, 71, | |
2, 3, 4, 5, 6, 7, 18, 18, 15, 19, | |
18, 18, 18, 18, 18, 136, 18, 113, 48, 3, | |
4, 26, 38, 140, 26, 113, 30, 30, 18, 63, | |
30, 30, 30, 30, 30, 27, 30, 67, 27, 68, |
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
[TestFixture] | |
public class XmlDecoderTests | |
{ | |
[Test] | |
public void can_decode_xml_response_as_static_object() | |
{ | |
IDecoder decoder = new XmlDecoder(); | |
var xml = GetXmlContent(); | |
var customer = decoder.DecodeToStatic<Customer>(xml, HttpContentTypes.ApplicationXml); |
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
[TestFixture] | |
public class DefaultDecoderTests | |
{ | |
[Test] | |
public void XmlAttributes_Are_Not_Converted_To_Elements() | |
{ | |
var customerRaw = @"<Customer Mode=""Add""> | |
<CustomerNo>02121V</CustomerNo> | |
</Customer>"; |
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 IEnumerable<IResult> LoadReport(int reportId) | |
{ | |
yield return Display.Busy(); | |
var service = new ReportingServiceClient(); | |
yield return Display.ChangeStatus("Preparing Reports..."); | |
yield return new WebServiceResult().Invoke(service.PrepareReports); |
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
namespace System.Drawing.Imaging | |
{ | |
public enum PixelFormat | |
{ | |
DontCare = 0, | |
Undefined = 0, | |
Max = 15, | |
Indexed = 65536, | |
Gdi = 131072, | |
Format16bppRgb555 = 135173, |
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
// Copyright 2004-2012 Castle Project - http://www.castleproject.org/ | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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 ActionResult HandleException() | |
{ | |
return HandleException(new Exception("An Exception Has Occurred")); | |
} | |
public ActionResult HandleException(Exception ex) | |
{ | |
throw ex; | |
} |
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
[TestFixture] | |
public class MockingAsyncTask | |
{ | |
[Test] | |
public async void can_mock_interface_methods_with_task_return() | |
{ | |
var mock = NSubstitute.Substitute.For<ILongRunningOperation>(); | |
var sut = new SystemUnderTest {Operaiton = mock}; | |
await sut.Execute(); |
OlderNewer