Skip to content

Instantly share code, notes, and snippets.

using ExternalLibrary;
using Oinant.Blog.Factory.ForTesting;
namespace Factory.Tests
{
public class TestFactory : INetworkMessageFactory
{
public NetworkMessage Create(Status status, object content)
{
var message = new NetworkMessageDouble(status, content);
using ExternalLibrary;
namespace Oinant.Blog.Factory.ForTesting
{
public class NetworkClientWithMessageFactory
{
private readonly INetworkMessageFactory _networkMessageFactory;
public NetworkClientWithMessageFactory(INetworkMessageFactory networkMessageFactory)
{
using ExternalLibrary;
namespace Oinant.Blog.Factory.ForTesting
{
public class NetworkClientWithoutMessageFactory
{
public string SendRequest()
{
var message = new NetworkService().SendMessage();
using ExternalLibrary;
namespace Oinant.Blog.Factory.ForTesting
{
public class NetworkClientWithoutMessageFactory
{
public string SendRequest()
{
var message = new NetworkService().SendMessage();
using System;
namespace ExternalLibrary
{
public class NetworkMessage
{
static readonly TimeSpan TimeToLive = TimeSpan.FromSeconds(10);
private readonly DateTime _creation;
private Status _status;
using System;
namespace Oinant.Blog.Factory.SimpleExemple
{
public class MyBusinessObject
{
private string _content;
private DateTime _dateTimeReleventToBusinessLogic;
public MyBusinessObject(Tuple<DateTime, String> creationData)
{