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
--- | |
version: ‘2’ | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:7.3.0 | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
environment: |
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.IO; | |
using System.Runtime.CompilerServices; | |
using System.Text.RegularExpressions; | |
using System.Threading; | |
namespace App | |
{ | |
public class TestHelper | |
{ |
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
// Log4Net | |
[assembly: log4net.Config.XmlConfigurator(Watch = true, ConfigFile = "log4net.config")] |
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 static class MockSet | |
{ | |
public static Mock<DbSet<T>> Create<T>(IQueryable<T> data) where T: class | |
{ | |
var mockSet = new Mock<DbSet<T>>(); | |
mockSet.As<IQueryable<T>>().SetupGet(mock => mock.Provider).Returns(data.Provider); | |
mockSet.As<IQueryable<T>>().SetupGet(mock => mock.Expression).Returns(data.Expression); | |
mockSet.As<IQueryable<T>>().SetupGet(mock => mock.ElementType).Returns(data.ElementType); | |
mockSet.As<IQueryable<T>>().Setup(mock => mock.GetEnumerator()).Returns(data.GetEnumerator()); |