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
private IEnumerable<string> FormatNonFunctional(List<string> shoppingList) | |
{ | |
var index = 0; | |
var result = new List<string>(); | |
_outp.WriteLine(shoppingList.Count.ToString()); | |
return shoppingList.Select(item => (index++).ToString() + item.Capitalize()); | |
} |
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.Linq; | |
using RestSharp; | |
using RestSharp.Serialization.Json; | |
using Xunit; | |
namespace JsonSerialization | |
{ | |
public class UnitTest1 | |
{ | |
private const string json = @"{""panes"":{""filter"":{""records"":[{""data"":{""customernumber"":""10002""}}]}}}"; |
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.Reflection; | |
using Autofac; | |
using Autofac.Features.OwnedInstances; | |
using FluentAssertions; | |
using KPMG.ITS.ERP.ETL.Customer; | |
using KPMG.ITS.ERP.ETL.DB; | |
using KPMG.ITS.ERP.ETL.UpdatingLog; | |
using Xunit; |
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
/// <summary> | |
/// This test verifies that UoW commits changes in a transaction. | |
/// Test is carried on by: | |
/// - running a transaction with exclusive lock on table LastUpdatingLog with the base.SqlConnection | |
/// - running the sut.Update (which opens another write transaction) | |
/// - execute SELECTs using another connection (with NoLock for checking uncommitted values) | |
/// The sut can commit its transaction only after first transaction is committed | |
/// </summary> | |
[Fact] | |
public void should_save_in_transaction() |
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 Autofac; | |
using FluentAssertions; | |
using Xunit; | |
namespace GenericLogger | |
{ | |
public interface ILogger<T> { } | |
public class Logger<T> : ILogger<T> | |
{ | |
public string Parameter { get; } |
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 Autofac; | |
using FluentAssertions; | |
using Xunit; | |
namespace GenericLogger | |
{ | |
public interface ILogger<T> | |
{ | |
delegate ILogger<T> Factory(MyParameter parameter); | |
} |
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 Context = System.Collections.Generic.Dictionary<string, object>; | |
using ExecFunc = System.Func<System.Collections.Generic.Dictionary<string, object>, System.Collections.Generic.Dictionary<string, object>>; | |
namespace CeacEvaluationSelector.Web.Test; | |
internal enum WfSteps | |
{ | |
Initial, | |
Step1, | |
Step2, |
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 MyNamespace; | |
internal static class Rules | |
{ | |
internal static IEnumerable<string> EmptyErrorList { get; } = Array.Empty<string>(); | |
internal delegate IEnumerable<string> Validator<T>(T value); | |
internal static Validator<T> ParentOrChildren<T>(Validator<T> parent, IEnumerable<Validator<T>> children) => | |
value => | |
{ |