예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FakeItEasyMockFactory"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system.</param>
 /// <exception cref="System.InvalidOperationException">Unable to find Type FakeItEasy.A in assembly  + assembly.Location</exception>
 public FakeItEasyMockFactory(IFileSystem fileSystem)
 {
     var assembly = fileSystem.Load("FakeItEasy");
     _mockOpenType = fileSystem.GetTypeFrom(assembly, "FakeItEasy.A");
     if (_mockOpenType == null)
         throw new InvalidOperationException("Unable to find Type FakeItEasy.A in assembly " + assembly.Location);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NSubstituteMockFactory"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system wrapper.</param>
 /// <exception cref="System.InvalidOperationException">Unable to find Type NSubstitute.Substitute in assembly  + assembly.Location</exception>
 public NSubstituteMockFactory(IFileSystem fileSystem)
 {
     var assembly = fileSystem.Load("NSubstitute");
     _mockOpenType = fileSystem.GetTypeFrom(assembly, "NSubstitute.Substitute");
     if (_mockOpenType == null)
         throw new InvalidOperationException("Unable to find Type NSubstitute.Substitute in assembly " + assembly.Location);
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NSubstituteMockFactory"/> class.
        /// </summary>
        /// <param name="fileSystem">The file system wrapper.</param>
        /// <exception cref="System.InvalidOperationException">Unable to find Type NSubstitute.Substitute in assembly  + assembly.Location</exception>
        public NSubstituteMockFactory(IFileSystem fileSystem)
        {
            var assembly = fileSystem.Load("NSubstitute");

            _mockOpenType = fileSystem.GetTypeFrom(assembly, "NSubstitute.Substitute");
            if (_mockOpenType == null)
            {
                throw new InvalidOperationException("Unable to find Type NSubstitute.Substitute in assembly " + assembly.Location);
            }
        }
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoqMockFactory"/> class.
        /// </summary>
        /// <param name="fileSystem">The file system.</param>
        /// <exception cref="System.InvalidOperationException">Unable to find Type Moq.Mock`1 in assembly  + assembly.Location</exception>
        public MoqMockFactory(IFileSystem fileSystem)
        {
            var assembly = fileSystem.Load("Moq");

            _mockOpenType = fileSystem.GetTypeFrom(assembly, "Moq.Mock`1");
            if (_mockOpenType == null)
            {
                throw new InvalidOperationException("Unable to find Type Moq.Mock`1 in assembly " + assembly.Location);
            }
        }
예제 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FakeItEasyMockFactory"/> class.
        /// </summary>
        /// <param name="fileSystem">The file system.</param>
        /// <exception cref="System.InvalidOperationException">Unable to find Type FakeItEasy.A in assembly  + assembly.Location</exception>
        public FakeItEasyMockFactory(IFileSystem fileSystem)
        {
            var assembly = fileSystem.Load("FakeItEasy");

            _mockOpenType = fileSystem.GetTypeFrom(assembly, "FakeItEasy.A");
            if (_mockOpenType == null)
            {
                throw new InvalidOperationException("Unable to find Type FakeItEasy.A in assembly " + assembly.Location);
            }
        }