namespace FakeItEasy.Sdk
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using FakeItEasy.Creation;
///
/// Provides methods for generating fake objects.
///
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "A", Justification = "Is spelled correctly.")]
public static class Create
{
private static IFakeCreatorFacade FakeCreator
{
get { return ServiceLocator.Current.Resolve(); }
}
///
/// Creates a fake object of the specified type.
///
/// The type of fake object to create.
/// A fake object.
public static object Fake(Type typeOfFake)
{
return FakeCreator.CreateFake(typeOfFake, x => { });
}
///
/// Creates a fake object of the specified type.
///
/// The type of fake object to create.
/// A lambda where options for the built fake object can be specified.
/// A fake object.
public static object Fake(Type typeOfFake, Action optionsBuilder)
{
return FakeCreator.CreateFake(typeOfFake, optionsBuilder);
}
///
/// Creates a collection of fakes of the specified type.
///
/// The type of fakes to create.
/// The number of fakes in the collection.
/// A collection of fake objects of the specified type.
public static IList