diff --git a/Moq.Tests/Pex/Moq.UnitTests.Pex.csproj b/Moq.Tests/Pex/Moq.UnitTests.Pex.csproj deleted file mode 100644 index 56163233b..000000000 --- a/Moq.Tests/Pex/Moq.UnitTests.Pex.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {662DD403-EFFD-4804-A29D-2E1F80D92835} - Library - Properties - Moq.UnitTests.Pex - Moq.UnitTests.Pex - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - C:\Program Files (x86)\Microsoft Pex\bin\Microsoft.Pex.Framework.dll - - - - - 3.5 - - - - - - - - - - - - {1C91AC30-5977-4BE5-BA67-8EB186C03514} - Moq - - - - - - - - \ No newline at end of file diff --git a/Moq.Tests/Pex/Moq.UnitTests.Pex.sln b/Moq.Tests/Pex/Moq.UnitTests.Pex.sln deleted file mode 100644 index 50f4d9094..000000000 --- a/Moq.Tests/Pex/Moq.UnitTests.Pex.sln +++ /dev/null @@ -1,34 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moq.UnitTests.Pex", "Moq.UnitTests.Pex.csproj", "{662DD403-EFFD-4804-A29D-2E1F80D92835}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moq", "..\..\Source\Moq.csproj", "{1C91AC30-5977-4BE5-BA67-8EB186C03514}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Debug|Any CPU.Build.0 = Debug|Any CPU - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Debug|x86.ActiveCfg = Debug|Any CPU - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Release|Any CPU.ActiveCfg = Release|Any CPU - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Release|Any CPU.Build.0 = Release|Any CPU - {662DD403-EFFD-4804-A29D-2E1F80D92835}.Release|x86.ActiveCfg = Release|Any CPU - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Debug|x86.ActiveCfg = Debug|x86 - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Debug|x86.Build.0 = Debug|x86 - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Release|Any CPU.Build.0 = Release|Any CPU - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Release|x86.ActiveCfg = Release|x86 - {1C91AC30-5977-4BE5-BA67-8EB186C03514}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Moq.Tests/Pex/ShouldExpectCallReturn.cs b/Moq.Tests/Pex/ShouldExpectCallReturn.cs deleted file mode 100644 index 8c499bc0c..000000000 --- a/Moq.Tests/Pex/ShouldExpectCallReturn.cs +++ /dev/null @@ -1,36 +0,0 @@ -// ==++== -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// ==--== - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Pex.Framework; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using Microsoft.Pex.Framework.Suppression; -using Microsoft.Pex.Framework.Choices; - -namespace Mock.Tests -{ - [TestClass] - [PexClass(Suite = "checkin")] - public partial class ShouldExpectCallReturn - { - [TestMethod] - [PexMethod(MaxBranches = int.MaxValue)] - public void Moq() - { - // ShouldExpectCallReturn - var mock = new Mock(); - var clone = new object(); - - mock.Setup(x => x.Clone()).Returns(clone); - - Assert.AreSame(clone, mock.Object.Clone()); - } - } -} diff --git a/Moq.Tests/Pex/ShouldExpectCallWithArgument.cs b/Moq.Tests/Pex/ShouldExpectCallWithArgument.cs deleted file mode 100644 index 05b6bbe3e..000000000 --- a/Moq.Tests/Pex/ShouldExpectCallWithArgument.cs +++ /dev/null @@ -1,84 +0,0 @@ -// ==++== -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// ==--== - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Pex.Framework; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using Microsoft.Pex.Framework.Suppression; -using Microsoft.Pex.Framework.Instrumentation; -using System.Diagnostics; -using Microsoft.Pex.Framework.Choices; -using Microsoft.Pex.Framework.Validation; - -[assembly: PexInstrumentAssembly("Moq")] -[assembly: PexInstrumentAssembly("DynamicProxyGenAssembly2")] - -namespace Mock.Tests -{ - [TestClass] - [PexClass(Suite = "checkin")] - public partial class ShouldExpectCallWithArgument - { - public interface IFoo - { - int DoInt(int i); - } - - [TestMethod] - [PexMethod(MaxBranches = int.MaxValue)] - public void Moq() - { - // ShouldExpectCallWithArgument - var mock = new Mock(); - mock.Setup(x => x.DoInt(1)).Returns(11); - mock.Setup(x => x.DoInt(2)).Returns(22); - - Assert.AreEqual(11, mock.Object.DoInt(1)); - Assert.AreEqual(22, mock.Object.DoInt(2)); - } - - [PexMethod(MaxBranches = int.MaxValue)] - [PexExpectedGoals] - public void MoqWithParameterValue(int y) - { - // ShouldExpectCallWithArgument - var mock = new Mock(); - mock.Setup(x => x.DoInt(1)).Returns(y); - - if (mock.Object.DoInt(1) == 4242) - throw new PexGoalException(); - } - - [PexMethod(MaxBranches = int.MaxValue)] - [PexExpectedGoals] - public void MoqWithParameterDelegate(int y) - { - // ShouldExpectCallWithArgument - var mock = new Mock(); - mock.Setup(x => x.DoInt(1)).Returns(() => y); - - if (mock.Object.DoInt(1) == 4242) - throw new PexGoalException(); - } - - [PexMethod(MaxBranches = int.MaxValue)] - [PexExpectedGoals] - [PexIgnore("TODO")] - public void MoqWithSymbolicArgumentParameterValue(int y, int z) - { - // ShouldExpectCallWithArgument - var mock = new Mock(); - mock.Setup(x => x.DoInt(y)).Returns(() => z); - - if (mock.Object.DoInt(2323) == 4242) - throw new PexGoalException(); - } - } -} diff --git a/Moq.Tests/Pex/ShouldExpectCallWithReferenceLazyEvaluate.cs b/Moq.Tests/Pex/ShouldExpectCallWithReferenceLazyEvaluate.cs deleted file mode 100644 index 03808e70f..000000000 --- a/Moq.Tests/Pex/ShouldExpectCallWithReferenceLazyEvaluate.cs +++ /dev/null @@ -1,39 +0,0 @@ -// ==++== -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// ==--== - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Pex.Framework; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using Microsoft.Pex.Framework.Suppression; -using Microsoft.Pex.Framework.Choices; - -namespace Mock.Tests -{ - [TestClass] - [PexClass(Suite = "checkin")] - public partial class ShouldExpectCallWithReferenceLazyEvaluate - { - public interface IFoo - { - int Parse(string value); - } - - [PexMethod(MaxBranches = int.MaxValue)] - public void Moq() - { - int a = 25; - var mock = new Mock(); - mock.Setup(x => x.Parse(a.ToString())).Returns(() => a); - - a = 10; - Assert.AreEqual(10, mock.Object.Parse("10")); - } - } -} diff --git a/Moq.Tests/Pex/ShouldExpectReturnPropertyValue.cs b/Moq.Tests/Pex/ShouldExpectReturnPropertyValue.cs deleted file mode 100644 index fbda74f95..000000000 --- a/Moq.Tests/Pex/ShouldExpectReturnPropertyValue.cs +++ /dev/null @@ -1,36 +0,0 @@ -// ==++== -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// ==--== - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Pex.Framework; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using Microsoft.Pex.Framework.Suppression; -using Microsoft.Pex.Framework.Choices; - -namespace Mock.Tests -{ - [TestClass] - [PexClass(Suite = "checkin")] - public partial class ShouldExpectReturnPropertyValue - { - public interface IFoo - { - int ValueProperty { get; } - } - - [PexMethod(MaxBranches = int.MaxValue)] - public void Moq() - { - var mock = new Mock(); - mock.Setup(x => x.ValueProperty).Returns(25); - Assert.AreEqual(25, mock.Object.ValueProperty); - } - } -} diff --git a/Moq.Tests/Pex/ShouldMatchPredicateArgument.cs b/Moq.Tests/Pex/ShouldMatchPredicateArgument.cs deleted file mode 100644 index 639416cea..000000000 --- a/Moq.Tests/Pex/ShouldMatchPredicateArgument.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ==++== -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// ==--== - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Pex.Framework; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Moq; -using Microsoft.Pex.Framework.Suppression; - -namespace Mock.Tests -{ - [TestClass] - [PexClass(Suite = "checkin")] - public partial class ShouldMatchPredicateArgument - { - public interface IFoo - { - int Duplicate(int i); - } - - [TestMethod] - [PexMethod(MaxBranches = int.MaxValue)] - public void Moq() - { - var mock = new Mock(); - - mock.Setup(x => x.Duplicate(It.Is(value => value < 5 && value > 0))) - .Returns(() => 1); - - Assert.AreEqual(1, mock.Object.Duplicate(3)); - Assert.AreEqual(0, mock.Object.Duplicate(0)); - } - } -} diff --git a/Moq.nuspec b/Moq.nuspec index a6b8d3625..bca908ce3 100644 --- a/Moq.nuspec +++ b/Moq.nuspec @@ -30,11 +30,11 @@ - - - - - - + + + + + + diff --git a/Moq.sln b/Moq.sln index c1361f767..23d4ba3ea 100644 --- a/Moq.sln +++ b/Moq.sln @@ -14,11 +14,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq", "Source\Moq.csproj", "{1C91AC30-5977-4BE5-BA67-8EB186C03514}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq", "src\Moq\Moq.csproj", "{1C91AC30-5977-4BE5-BA67-8EB186C03514}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq.Tests", "Moq.Tests\Moq.Tests.csproj", "{81BBC911-4916-4E10-A955-752AE47CB2B9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq.Tests", "tests\Moq.Tests\Moq.Tests.csproj", "{81BBC911-4916-4E10-A955-752AE47CB2B9}" EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Moq.Tests.VisualBasic", "Moq.Tests.VisualBasic\Moq.Tests.VisualBasic.vbproj", "{840A8B2E-3D4B-4521-A61A-0291562CDC8B}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Moq.Tests.VisualBasic", "tests\Moq.Tests.VisualBasic\Moq.Tests.VisualBasic.vbproj", "{840A8B2E-3D4B-4521-A61A-0291562CDC8B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Samples/Lib/Microsoft.Web.Mvc.dll b/Samples/Lib/Microsoft.Web.Mvc.dll deleted file mode 100644 index 1def4df90..000000000 Binary files a/Samples/Lib/Microsoft.Web.Mvc.dll and /dev/null differ diff --git a/Samples/Lib/Moq.dll b/Samples/Lib/Moq.dll deleted file mode 100644 index e1b049e3d..000000000 Binary files a/Samples/Lib/Moq.dll and /dev/null differ diff --git a/Samples/Lib/Moq.pdb b/Samples/Lib/Moq.pdb deleted file mode 100644 index bc7a83007..000000000 Binary files a/Samples/Lib/Moq.pdb and /dev/null differ diff --git a/Samples/Lib/Moq.xml b/Samples/Lib/Moq.xml deleted file mode 100644 index f0592f204..000000000 --- a/Samples/Lib/Moq.xml +++ /dev/null @@ -1,3450 +0,0 @@ - - - - Moq - - - - - Interface to be implemented by classes that determine the - default value of non-expected invocations. - - - - - Provides a value for the given member and arguments. - - The member to provide a default - value for. - Optional arguments passed in - to the call that requires a default value. - - - - Provides a typed for a - specific type of . - - The type of event arguments required by the event. - - The mocked event can either be a or custom - event handler which follows .NET practice of providing object sender, EventArgs args - kind of signature. - - - - - Represents a generic event that has been mocked and can - be rised. - - - - - Provided solely to allow the interceptor to determine when the attached - handler is coming from this mocked event so we can assign the - corresponding EventInfo for it. - - - - - Raises the associated event with the given - event argument data. - - - - - Provides support for attaching a to - a generic event. - - Event to convert. - - - - Event raised whenever the mocked event is rised. - - - - - Raises the associated event with the given - event argument data. - - Data to pass to the event. - - - - Provides support for attaching a to - a generic event. - - Event to convert. - - - - Provided solely to allow the interceptor to determine when the attached - handler is coming from this mocked event so we can assign the - corresponding EventInfo for it. - - - - - Utility factory class to use to construct multiple - mocks when consistent verification is - desired for all of them. - - - If multiple mocks will be created during a test, passing - the desired (if different than the - or the one - passed to the factory constructor) and later verifying each - mock can become repetitive and tedious. - - This factory class helps in that scenario by providing a - simplified creation of multiple mocks with a default - (unless overriden by calling - ) and posterior verification. - - - - The following is a straightforward example on how to - create and automatically verify strict mocks using a : - - var factory = new MockFactory(MockBehavior.Strict); - - var foo = factory.Create<IFoo>(); - var bar = factory.Create<IBar>(); - - // no need to call Verifiable() on the setup - // as we'll be validating all of them anyway. - foo.Setup(f => f.Do()); - bar.Setup(b => b.Redo()); - - // exercise the mocks here - - factory.VerifyAll(); - // At this point all setups are already checked - // and an optional MockException might be thrown. - // Note also that because the mocks are strict, any invocation - // that doesn't have a matching setup will also throw a MockException. - - The following examples shows how to setup the factory - to create loose mocks and later verify only verifiable setups: - - var factory = new MockFactory(MockBehavior.Loose); - - var foo = factory.Create<IFoo>(); - var bar = factory.Create<IBar>(); - - // this setup will be verified when we verify the factory - foo.Setup(f => f.Do()).Verifiable(); - - // this setup will NOT be verified - foo.Setup(f => f.Calculate()); - - // this setup will be verified when we verify the factory - bar.Setup(b => b.Redo()).Verifiable(); - - // exercise the mocks here - // note that because the mocks are Loose, members - // called in the interfaces for which no matching - // setups exist will NOT throw exceptions, - // and will rather return default values. - - factory.Verify(); - // At this point verifiable setups are already checked - // and an optional MockException might be thrown. - - The following examples shows how to setup the factory with a - default strict behavior, overriding that default for a - specific mock: - - var factory = new MockFactory(MockBehavior.Strict); - - // this particular one we want loose - var foo = factory.Create<IFoo>(MockBehavior.Loose); - var bar = factory.Create<IBar>(); - - // specify setups - - // exercise the mocks here - - factory.Verify(); - - - - - - - Initializes the factory with the given - for newly created mocks from the factory. - - The behavior to use for mocks created - using the factory method if not overriden - by using the overload. - - - - Creates a new mock with the default - specified at factory construction time. - - Type to mock. - A new . - - - var factory = new MockFactory(MockBehavior.Strict); - - var foo = factory.Create<IFoo>(); - // use mock on tests - - factory.VerifyAll(); - - - - - - Creates a new mock with the default - specified at factory construction time and with the - the given constructor arguments for the class. - - - The mock will try to find the best match constructor given the - constructor arguments, and invoke that to initialize the instance. - This applies only to classes, not interfaces. - - Type to mock. - Constructor arguments for mocked classes. - A new . - - - var factory = new MockFactory(MockBehavior.Default); - - var mock = factory.Create<MyBase>("Foo", 25, true); - // use mock on tests - - factory.Verify(); - - - - - - Creates a new mock with the given . - - Type to mock. - Behavior to use for the mock, which overrides - the default behavior specified at factory construction time. - A new . - - The following example shows how to create a mock with a different - behavior to that specified as the default for the factory: - - var factory = new MockFactory(MockBehavior.Strict); - - var foo = factory.Create<IFoo>(MockBehavior.Loose); - - - - - - Creates a new mock with the given - and with the the given constructor arguments for the class. - - - The mock will try to find the best match constructor given the - constructor arguments, and invoke that to initialize the instance. - This applies only to classes, not interfaces. - - Type to mock. - Behavior to use for the mock, which overrides - the default behavior specified at factory construction time. - Constructor arguments for mocked classes. - A new . - - The following example shows how to create a mock with a different - behavior to that specified as the default for the factory, passing - constructor arguments: - - var factory = new MockFactory(MockBehavior.Default); - - var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); - - - - - - Implements creation of a new mock within the factory. - - Type to mock. - The behavior for the new mock. - Optional arguments for the construction of the mock. - - - - Verifies all verifiable expectations on all mocks created - by this factory. - - - One or more mocks had expectations that were not satisfied. - - - - Verifies all verifiable expectations on all mocks created - by this factory. - - - One or more mocks had expectations that were not satisfied. - - - - Invokes for each mock - in , and accumulates the resulting - that might be - thrown from the action. - - The action to execute against - each mock. - - - - Whether the base member virtual implementation will be called - for mocked classes if no setup is matched. Defaults to . - - - - - Specifies the behavior to use when returning default values for - unexpected invocations on loose mocks. - - - - - Gets the mocks that have been created by this factory and - that will get verified together. - - - - - Defines the Throws verb. - - - - - Helper interface used to hide the base - members from the fluent API to make it much cleaner - in Visual Studio intellisense. - - - - - - - - - - - - - - - - - Specifies the exception to throw when the method is invoked. - - Exception instance to throw. - - This example shows how to throw an exception when the method is - invoked with an empty string argument: - - mock.Setup(x => x.Execute("")) - .Throws(new ArgumentException()); - - - - - - Specifies the type of exception to throw when the method is invoked. - - Type of exception to instantiate and throw when the setup is matched. - - This example shows how to throw an exception when the method is - invoked with an empty string argument: - - mock.Setup(x => x.Execute("")) - .Throws<ArgumentException>(); - - - - - - Allows the specification of a matching condition for an - argument in a method invocation, rather than a specific - argument value. "It" refers to the argument being matched. - - - This class allows the setup to match a method invocation - with an arbitrary value, with a value in a specified range, or - even one that matches a given predicate. - - - - - Matches any value of the given type. - - - Typically used when the actual argument value for a method - call is not relevant. - - - - // Throws an exception for a call to Remove with any string value. - mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); - - - Type of the value. - - - - Matches any value that satisfies the given predicate. - - Type of the argument to check. - The predicate used to match the method argument. - - Allows the specification of a predicate to perform matching - of method call arguments. - - - This example shows how to return the value 1 whenever the argument to the - Do method is an even number. - - mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) - .Returns(1); - - This example shows how to throw an exception if the argument to the - method is a negative number: - - mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) - .Throws(new ArgumentException()); - - - - - - Matches any value that is in the range specified. - - Type of the argument to check. - The lower bound of the range. - The upper bound of the range. - The kind of range. See . - - The following example shows how to expect a method call - with an integer argument within the 0..100 range. - - mock.Setup(x => x.HasInventory( - It.IsAny<string>(), - It.IsInRange(0, 100, Range.Inclusive))) - .Returns(false); - - - - - - Matches a string argument if it matches the given regular expression pattern. - - The pattern to use to match the string argument value. - - The following example shows how to expect a call to a method where the - string argument matches the given regular expression: - - mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); - - - - - - Matches a string argument if it matches the given regular expression pattern. - - The pattern to use to match the string argument value. - The options used to interpret the pattern. - - The following example shows how to expect a call to a method where the - string argument matches the given regular expression, in a case insensitive way: - - mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); - - - - - - Defines the Returns verb. - - Mocked type. - Type of the return value from the expression. - - - - Specifies the value to return. - - The value to return, or . - - Return a true value from the method call: - - mock.Setup(x => x.Execute("ping")) - .Returns(true); - - - - - - Specifies a function that will calculate the value to return from the method. - - The function that will calculate the return value. - - Return a calculated value when the method is called: - - mock.Setup(x => x.Execute("ping")) - .Returns(() => returnValues[0]); - - The lambda expression to retrieve the return value is lazy-executed, - meaning that its value may change depending on the moment the method - is executed and the value the returnValues array has at - that moment. - - - - - Specifies a function that will calculate the value to return from the method, - retrieving the arguments for the invocation. - - Type of the argument of the invoked method. - The function that will calculate the return value. - - Return a calculated value which is evaluated lazily at the time of the invocation. - - The lookup list can change between invocations and the setup - will return different values accordingly. Also, notice how the specific - string argument is retrieved by simply declaring it as part of the lambda - expression: - - - mock.Setup(x => x.Execute(It.IsAny<string>())) - .Returns((string command) => returnValues[command]); - - - - - - Specifies a function that will calculate the value to return from the method, - retrieving the arguments for the invocation. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - The function that will calculate the return value. - - Return a calculated value which is evaluated lazily at the time of the invocation. - - The return value is calculated from the value of the actual method invocation arguments. - Notice how the arguments are retrieved by simply declaring them as part of the lambda - expression: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>())) - .Returns((string arg1, string arg2) => arg1 + arg2); - - - - - - Specifies a function that will calculate the value to return from the method, - retrieving the arguments for the invocation. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - The function that will calculate the return value. - - Return a calculated value which is evaluated lazily at the time of the invocation. - - The return value is calculated from the value of the actual method invocation arguments. - Notice how the arguments are retrieved by simply declaring them as part of the lambda - expression: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>())) - .Returns((string arg1, string arg2, int arg3) => arg1 + arg2 + arg3); - - - - - - Specifies a function that will calculate the value to return from the method, - retrieving the arguments for the invocation. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - Type of the fourth argument of the invoked method. - The function that will calculate the return value. - - Return a calculated value which is evaluated lazily at the time of the invocation. - - The return value is calculated from the value of the actual method invocation arguments. - Notice how the arguments are retrieved by simply declaring them as part of the lambda - expression: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>(), - It.IsAny<bool>())) - .Returns((string arg1, string arg2, int arg3, bool arg4) => arg1 + arg2 + arg3 + arg4); - - - - - - Implemented by all generated mock object instances. - - - - - Implemented by all generated mock object instances. - - - - - Reference the Mock that contains this as the mock.Object value. - - - - - Reference the Mock that contains this as the mock.Object value. - - - - - Defines the Raises verb. - - - - - Specifies the event that will be raised - when the setup is met. - - An expression that represents an event attach or detach action. - The event arguments to pass for the raised event. - - The following example shows how to raise an event when - the setup is met: - - var mock = new Mock<IContainer>(); - - mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) - .Raises(add => add.Added += null, EventArgs.Empty); - - - - - - Specifies the event that will be raised - when the setup is matched. - - An expression that represents an event attach or detach action. - A function that will build the - to pass when raising the event. - - - - - Specifies the event that will be raised - when the setup is matched. - - An expression that represents an event attach or detach action. - A function that will build the - to pass when raising the event. - Type of the argument received by the expected invocation. - - - - - Specifies the event that will be raised - when the setup is matched. - - An expression that represents an event attach or detach action. - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - - - - - Specifies the event that will be raised - when the setup is matched. - - An expression that represents an event attach or detach action. - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - Type of the third argument received by the expected invocation. - - - - - Specifies the event that will be raised - when the setup is matched. - - An expression that represents an event attach or detach action. - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - Type of the third argument received by the expected invocation. - Type of the fourth argument received by the expected invocation. - - - - - Implements the fluent API. - - - - - Defines the Callback verb and overloads. - - - - - Specifies a callback to invoke when the method is called. - - Callback method to invoke. - - The following example specifies a callback to set a boolean - value that can be used later: - - bool called = false; - mock.Setup(x => x.Execute()) - .Callback(() => called = true); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Argument type of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation argument value. - - Notice how the specific string argument is retrieved by simply declaring - it as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute(It.IsAny<string>())) - .Callback((string command) => Console.WriteLine(command)); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>())) - .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>())) - .Callback((string arg1, string arg2, int arg3) => Console.WriteLine(arg1 + arg2 + arg3)); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - Type of the fourth argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>(), - It.IsAny<bool>())) - .Callback((string arg1, string arg2, int arg3, bool arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); - - - - - - Defines occurrence members to constraint setups. - - - - - The expected invocation can happen at most once. - - - - var mock = new Mock<ICommand>(); - mock.Setup(foo => foo.Execute("ping")) - .AtMostOnce(); - - - - - - The expected invocation can happen at most specified number of times. - - - - var mock = new Mock<ICommand>(); - mock.Setup(foo => foo.Execute("ping")) - .AtMost( 5 ); - - - - - - Defines the Raises verb. - - - - - Specifies the mocked event that will be raised - when the setup is met. - - The mocked event, retrieved from - or . - - The event args to pass when raising the event. - - The following example shows how to raise an event when - the setup is met: - - var mock = new Mock<IContainer>(); - // create handler to associate with the event to raise - var handler = mock.CreateEventHandler(); - // associate the handler with the event to raise - mock.Object.Added += handler; - // setup the invocation and the handler to raise - mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) - .Raises(handler, EventArgs.Empty); - - - - - - Specifies the mocked event that will be raised - when the setup is matched. - - The mocked event, retrieved from - or . - - A function that will build the - to pass when raising the event. - - - - - Specifies the mocked event that will be raised - when the setup is matched. - - The mocked event, retrieved from - or . - - A function that will build the - to pass when raising the event. - Type of the argument received by the expected invocation. - - - - - Specifies the mocked event that will be raised - when the setup is matched. - - The mocked event, retrieved from - or . - - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - - - - - Specifies the mocked event that will be raised - when the setup is matched. - - The mocked event, retrieved from - or . - - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - Type of the third argument received by the expected invocation. - - - - - Specifies the mocked event that will be raised - when the setup is matched. - - The mocked event, retrieved from - or . - - A function that will build the - to pass when raising the event. - Type of the first argument received by the expected invocation. - Type of the second argument received by the expected invocation. - Type of the third argument received by the expected invocation. - Type of the fourth argument received by the expected invocation. - - - - - Defines the Verifiable verb. - - - - - Marks the expectation as verifiable, meaning that a call - to will check if this particular - expectation was met. - - - The following example marks the expectation as verifiable: - - mock.Expect(x => x.Execute("ping")) - .Returns(true) - .Verifiable(); - - - - - - Marks the expectation as verifiable, meaning that a call - to will check if this particular - expectation was met, and specifies a message for failures. - - - The following example marks the expectation as verifiable: - - mock.Expect(x => x.Execute("ping")) - .Returns(true) - .Verifiable("Ping should be executed always!"); - - - - - Type to mock, which can be an interface or a class. - - Provides a mock implementation of . - - - Only abstract and virtual members of classes can be mocked. - - The behavior of the mock with regards to the setups and the actual calls is determined - by the optional that can be passed to the - constructor. - - - - The following example shows establishing setups with specific values - for method invocations: - - //setup - data - var order = new Order(TALISKER, 50); - var mock = new Mock<IWarehouse>(); - - //setup - mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); - - //exercise - order.Fill(mock.Object); - - //verify - Assert.True(order.IsFilled); - - The following example shows how to use the class - to specify conditions for arguments instead of specific values: - - //setup - data - var order = new Order(TALISKER, 50); - var mock = new Mock<IWarehouse>(); - - //setup - //shows how to expect a value within a range - mock.Setup(x => x.HasInventory( - It.IsAny<string>(), - It.IsInRange(0, 100, Range.Inclusive))) - .Returns(false); - - //shows how to throw for unexpected calls. - mock.Setup(x => x.Remove( - It.IsAny<string>(), - It.IsAny<int>())) - .Throws(new InvalidOperationException()); - - //exercise - order.Fill(mock.Object); - - //verify - Assert.False(order.IsFilled); - - - - - - Base class for mocks and static helper class with methods that - apply to mocked objects, such as to - retrieve a from an object instance. - - - - - Retrieves the mock object for the given object instance. - - Type of the mock to retrieve. Can be omitted as it's inferred - from the object instance passed in as the instance. - The instance of the mocked object. - The mock associated with the mocked object. - The received instance - was not created by Moq. - - The following example shows how to add a new setup to an object - instance which is not the original but rather - the object associated with it: - - // Typed instance, not the mock, is retrieved from some test API. - HttpContextBase context = GetMockContext(); - - // context.Request is the typed object from the "real" API - // so in order to add a setup to it, we need to get - // the mock that "owns" it - Mock<HttpRequestBase> request = Mock.Get(context.Request); - mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) - .Returns(tempUrl); - - - - - - Returns the mocked object value. - - - - - Verifies that all verifiable expectations have been met. - - - This example sets up an expectation and marks it as verifiable. After - the mock is used, a Verify() call is issued on the mock - to ensure the method in the setup was invoked: - - var mock = new Mock<IWarehouse>(); - this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); - ... - // other test code - ... - // Will throw if the test code has didn't call HasInventory. - this.Verify(); - - - Not all verifiable expectations were met. - - - - Verifies all expectations regardless of whether they have - been flagged as verifiable. - - - This example sets up an expectation without marking it as verifiable. After - the mock is used, a call is issued on the mock - to ensure that all expectations are met: - - var mock = new Mock<IWarehouse>(); - this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); - ... - // other test code - ... - // Will throw if the test code has didn't call HasInventory, even - // that expectation was not marked as verifiable. - this.VerifyAll(); - - - At least one expectation was not met. - - - - Gets the interceptor target for the given expression and root mock, - building the intermediate hierarchy of mock objects if necessary. - - - - - Creates a handler that can be associated to an event receiving - the given and can be used - to raise the event. - - Type of - data passed in to the event. - - This example shows how to invoke an event with a custom event arguments - class in a view that will cause its corresponding presenter to - react by changing its state: - - var mockView = new Mock<IOrdersView>(); - var mockedEvent = mockView.CreateEventHandler<OrderEventArgs>(); - - var presenter = new OrdersPresenter(mockView.Object); - - // Check that the presenter has no selection by default - Assert.Null(presenter.SelectedOrder); - - // Create a mock event handler of the appropriate type - var handler = mockView.CreateEventHandler<OrderEventArgs>(); - // Associate it with the event we want to raise - mockView.Object.Cancel += handler; - // Finally raise the event with a specific arguments data - handler.Raise(new OrderEventArgs { Order = new Order("moq", 500) }); - - // Now the presenter reacted to the event, and we have a selected order - Assert.NotNull(presenter.SelectedOrder); - Assert.Equal("moq", presenter.SelectedOrder.ProductName); - - - - - - Creates a handler that can be associated to an event receiving - a generic and can be used - to raise the event. - - - This example shows how to invoke a generic event in a view that will - cause its corresponding presenter to react by changing its state: - - var mockView = new Mock<IOrdersView>(); - var mockedEvent = mockView.CreateEventHandler(); - - var presenter = new OrdersPresenter(mockView.Object); - - // Check that the presenter is not in the "Canceled" state - Assert.False(presenter.IsCanceled); - - // Create a mock event handler of the appropriate type - var handler = mockView.CreateEventHandler(); - // Associate it with the event we want to raise - mockView.Object.Cancel += handler; - // Finally raise the event - handler.Raise(EventArgs.Empty); - - // Now the presenter reacted to the event, and changed its state - Assert.True(presenter.IsCanceled); - - - - - - Exposes the list of extra interfaces implemented by the mock. - - - - - Behavior of the mock, according to the value set in the constructor. - - - - - Whether the base member virtual implementation will be called - for mocked classes if no setup is matched. Defaults to . - - - - - Specifies the behavior to use when returning default values for - unexpected invocations on loose mocks. - - - - - Specifies the class that will determine the default - value to return when invocations are made that - have no setups and need to return a default - value (for loose mocks). - - - - - Gets the mocked object instance. - - - - - Retrieves the type of the mocked object, its generic type argument. - This is used in the auto-mocking of hierarchy access. - - - - - Base class for visitors of expression trees. - - - Provides the functionality of the internal visitor base class that - comes with Linq. - Matt's comments on the implementation: - - In this variant there is only one visitor class that dispatches calls to the general - Visit function out to specific VisitXXX methods corresponding to different node types. - Note not every node type gets it own method, for example all binary operators are - treated in one VisitBinary method. The nodes themselves do not directly participate - in the visitation process. They are treated as just data. - The reason for this is that the quantity of visitors is actually open ended. - You can write your own. Therefore no semantics of visiting is coupled into the node classes. - It’s all in the visitors. The default visit behavior for node XXX is baked into the base - class’s version of VisitXXX. - - - Another variant is that all VisitXXX methods return a node. - The Expression tree nodes are immutable. In order to change the tree you must construct - a new one. The default VisitXXX methods will construct a new node if any of its sub-trees change. - If no changes are made then the same node is returned. That way if you make a change - to a node (by making a new node) deep down in a tree, the rest of the tree is rebuilt - automatically for you. - - See: http://blogs.msdn.com/mattwar/archive/2007/07/31/linq-building-an-iqueryable-provider-part-ii.aspx. - - Matt Warren: http://blogs.msdn.com/mattwar - Documented by InSTEDD: http://www.instedd.org - - - - Default constructor used by derived visitors. - - - - - Visits the , determining which - of the concrete Visit methods to call. - - - - - Visits the generic , determining and - calling the appropriate Visit method according to the - , which will result - in calls to , - or . - - - - - - - Visits the initializer by - calling the for the - . - - - - - Visits the expression by - calling with the expression. - - - - - Visits the by calling - with the , - and - expressions. - - - - - Visits the by calling - with the - expression. - - - - - Visits the , by default returning the - same without further behavior. - - - - - Visits the by calling - with the , - and - expressions. - - - - - Visits the returning it - by default without further behavior. - - - - - Visits the by calling - with the - expression. - - - - - Visits the by calling - with the expression, - and then with the . - - - - - - - Visits the by iterating - the list and visiting each in it. - - - - - - - Visits the by calling - with the expression. - - - - - - - Visits the by calling - with the . - - - - - - - Visits the by calling - with the - . - - - - - - - Visits the by - calling for each in the - collection. - - - - - - - Visits the by - calling for each - in the collection. - - - - - - - Visits the by calling - with the expression. - - - - - - - Visits the by calling - with the - expressions. - - - - - - - Visits the by calling - with the - expression, then with the - . - - - - - Visits the by calling - with the - expression, and then with the - . - - - - - - - Visits the by calling - with the - expressions. - - - - - - - Visits the by calling - with the - expressions. - - - - - - - Sets an expectation on the mocked type for a call to - to a void method. - - - If more than one expectation is set for the same method or property, - the latest one wins and is the one that will be executed. - - Lambda expression that specifies the expected method invocation. - - - var mock = new Mock<IProcessor>(); - this.Setup(x => x.Execute("ping")); - - - - - - Sets an expectation on the mocked type for a call to - to a value returning method. - - Type of the return value. Typically omitted as it can be inferred from the expression. - - If more than one expectation is set for the same method or property, - the latest one wins and is the one that will be executed. - - Lambda expression that specifies the expected method invocation. - - - this.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); - - - - - - Sets an expectation on the mocked type for a call to - to a property getter. - - - If more than one expectation is set for the same property getter, - the latest one wins and is the one that will be executed. - - Type of the property. Typically omitted as it can be inferred from the expression. - Lambda expression that specifies the expected property getter. - - - this.SetupGet(x => x.Suspended) - .Returns(true); - - - - - - Sets an expectation on the mocked type for a call to - to a property setter. - - - If more than one expectation is set for the same property setter, - the latest one wins and is the one that will be executed. - - Type of the property. Typically omitted as it can be inferred from the expression. - Lambda expression that specifies the expected property setter. - - - this.SetupSet(x => x.Suspended); - - - - - - Sets an expectation on the mocked type for a call to - to a property setter with a specific value. - - - More than one expectation can be set for the setter with - different values. - - Type of the property. Typically omitted as it can be inferred from the expression. - Lambda expression that specifies the expected property setter. - The value expected to be set for the property. - - - this.SetupSet(x => x.Suspended, true); - - - - - - Ctor invoked by AsTInterface exclusively. - - - - - Initializes an instance of the mock with default behavior and with - the given constructor arguments for the class. (Only valid when is a class) - - - The mock will try to find the best match constructor given the constructor arguments, and invoke that - to initialize the instance. This applies only for classes, not interfaces. - - - var mock = new Mock<MyProvider>(someArgument, 25); - - Optional constructor arguments if the mocked type is a class. - - - - Initializes an instance of the mock with default behavior. - - - var mock = new Mock<IFormatProvider>(); - - - - - Initializes an instance of the mock with the specified behavior. - - - var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed); - - Behavior of the mock. - - - - Initializes an instance of the mock with a specific behavior with - the given constructor arguments for the class. - - - The mock will try to find the best match constructor given the constructor arguments, and invoke that - to initialize the instance. This applies only to classes, not interfaces. - - - var mock = new Mock<MyProvider>(someArgument, 25); - - Behavior of the mock. - Optional constructor arguments if the mocked type is a class. - - - - Returns the mocked object value. - - - - - Specifies a setup on the mocked type for a call to - to a void method. - - - If more than one setup is specified for the same method or property, - the latest one wins and is the one that will be executed. - - Lambda expression that specifies the expected method invocation. - - - var mock = new Mock<IProcessor>(); - mock.Setup(x => x.Execute("ping")); - - - - - - Specifies a setup on the mocked type for a call to - to a value returning method. - - Type of the return value. Typically omitted as it can be inferred from the expression. - - If more than one setup is specified for the same method or property, - the latest one wins and is the one that will be executed. - - Lambda expression that specifies the method invocation. - - - mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); - - - - - - Specifies a setup on the mocked type for a call to - to a property getter. - - - If more than one setup is set for the same property getter, - the latest one wins and is the one that will be executed. - - Type of the property. Typically omitted as it can be inferred from the expression. - Lambda expression that specifies the property getter. - - - mock.SetupGet(x => x.Suspended) - .Returns(true); - - - - - - Specifies a setup on the mocked type for a call to - to a property setter. - - - If more than one setup is set for the same property setter, - the latest one wins and is the one that will be executed. - - This overloads allows the use of a callback already - typed for the property type. - - - Type of the property. Typically omitted as it can be inferred from the expression. - Lambda expression that sets a property to a value. - - - mock.SetupSet(x => x.Suspended = true); - - - - - - Specifies a setup on the mocked type for a call to - to a property setter. - - - If more than one setup is set for the same property setter, - the latest one wins and is the one that will be executed. - - Lambda expression that sets a property to a value. - - - mock.SetupSet(x => x.Suspended = true); - - - - - - Specifies that the given property should have "property behavior", - meaning that setting its value will cause it to be saved and - later returned when the property is requested. (this is also - known as "stubbing"). - - Type of the property, inferred from the property - expression (does not need to be specified). - Property expression to stub. - - If you have an interface with an int property Value, you might - stub it using the following straightforward call: - - var mock = new Mock<IHaveValue>(); - mock.Stub(v => v.Value); - - After the Stub call has been issued, setting and - retrieving the object value will behave as expected: - - IHaveValue v = mock.Object; - - v.Value = 5; - Assert.Equal(5, v.Value); - - - - - - Specifies that the given property should have "property behavior", - meaning that setting its value will cause it to be saved and - later returned when the property is requested. This overload - allows setting the initial value for the property. (this is also - known as "stubbing"). - - Type of the property, inferred from the property - expression (does not need to be specified). - Property expression to stub. - Initial value for the property. - - If you have an interface with an int property Value, you might - stub it using the following straightforward call: - - var mock = new Mock<IHaveValue>(); - mock.SetupProperty(v => v.Value, 5); - - After the SetupProperty call has been issued, setting and - retrieving the object value will behave as expected: - - IHaveValue v = mock.Object; - // Initial value was stored - Assert.Equal(5, v.Value); - - // New value set which changes the initial value - v.Value = 6; - Assert.Equal(6, v.Value); - - - - - - Specifies that the all properties on the mock should have "property behavior", - meaning that setting its value will cause it to be saved and - later returned when the property is requested. (this is also - known as "stubbing"). The default value for each property will be the - one generated as specified by the property for the mock. - - - If the mock is set to , - the mocked default values will also get all properties setup recursively. - - - - - Verifies that a specific invocation matching the given expression was performed on the mock. Use - in conjuntion with the default . - - - This example assumes that the mock has been used, and later we want to verify that a given - invocation with specific parameters was performed: - - var mock = new Mock<IProcessor>(); - // exercise mock - //... - // Will throw if the test code didn't call Execute with a "ping" string argument. - mock.Verify(proc => proc.Execute("ping")); - - - The invocation was not performed on the mock. - Expression to verify. - - - - Verifies that a specific invocation matching the given expression was performed on the mock. Use - in conjuntion with the default . - - The invocation was not call the times specified by - . - Expression to verify. - The times a method is allowed to be called. - - - - Verifies that a specific invocation matching the given expression was performed on the mock, - specifying a failure error message. Use in conjuntion with the default - . - - - This example assumes that the mock has been used, and later we want to verify that a given - invocation with specific parameters was performed: - - var mock = new Mock<IProcessor>(); - // exercise mock - //... - // Will throw if the test code didn't call Execute with a "ping" string argument. - mock.Verify(proc => proc.Execute("ping")); - - - The invocation was not performed on the mock. - Expression to verify. - Message to show if verification fails. - - - - Verifies that a specific invocation matching the given expression was performed on the mock, - specifying a failure error message. Use in conjuntion with the default - . - - The invocation was not call the times specified by - . - Expression to verify. - The times a method is allowed to be called. - Message to show if verification fails. - - - - Verifies that a specific invocation matching the given expression was performed on the mock. Use - in conjuntion with the default . - - - This example assumes that the mock has been used, and later we want to verify that a given - invocation with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't call HasInventory. - mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); - - - The invocation was not performed on the mock. - Expression to verify. - Type of return value from the expression. - - - - Verifies that a specific invocation matching the given - expression was performed on the mock. Use in conjuntion - with the default . - - The invocation was not call the times specified by - . - Expression to verify. - The times a method is allowed to be called. - Type of return value from the expression. - - - - Verifies that a specific invocation matching the given - expression was performed on the mock, specifying a failure - error message. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given invocation - with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't call HasInventory. - mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); - - - The invocation was not performed on the mock. - Expression to verify. - Message to show if verification fails. - Type of return value from the expression. - - - - Verifies that a specific invocation matching the given - expression was performed on the mock, specifying a failure - error message. - Use in conjuntion with the default . - - The invocation was not call the times specified by - . - Expression to verify. - The times a method is allowed to be called. - Message to show if verification fails. - Type of return value from the expression. - - - - Verifies that a property was read on the mock. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given property - was retrieved from it: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't retrieve the IsClosed property. - mock.VerifyGet(warehouse => warehouse.IsClosed); - - - The invocation was not performed on the mock. - Expression to verify. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property was read on the mock. - Use in conjuntion with the default . - - The invocation was not call the times specified by - . - The times a method is allowed to be called. - Expression to verify. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property was read on the mock, specifying a failure - error message. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given property - was retrieved from it: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't retrieve the IsClosed property. - mock.VerifyGet(warehouse => warehouse.IsClosed); - - - The invocation was not performed on the mock. - Expression to verify. - Message to show if verification fails. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property was read on the mock, specifying a failure - error message. - Use in conjuntion with the default . - - The invocation was not call the times specified by - . - The times a method is allowed to be called. - Expression to verify. - Message to show if verification fails. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property was set on the mock. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given property - was set on it: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property. - mock.VerifySet(warehouse => warehouse.IsClosed = true); - - - The invocation was not performed on the mock. - Expression to verify. - - - - Verifies that a property was set on the mock. - Use in conjuntion with the default . - - The invocation was not call the times specified by - . - The times a method is allowed to be called. - Expression to verify. - - - - Verifies that a property was set on the mock, specifying - a failure message. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given property - was set on it: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property. - mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); - - - The invocation was not performed on the mock. - Expression to verify. - Message to show if verification fails. - - - - Verifies that a property was set on the mock, specifying - a failure message. - Use in conjuntion with the default . - - The invocation was not call the times specified by - . - The times a method is allowed to be called. - Expression to verify. - Message to show if verification fails. - - - - Adds an interface implementation to the mock, - allowing setups to be specified for it. - - - This method can only be called before the first use - of the mock property, at which - point the runtime type has already been generated - and no more interfaces can be added to it. - - Also, must be an - interface and not a class, which must be specified - when creating the mock instead. - - - The mock type - has already been generated by accessing the property. - The specified - is not an interface. - - The following example creates a mock for the main interface - and later adds to it to verify - it's called by the consumer code: - - var mock = new Mock<IProcessor>(); - mock.Setup(x => x.Execute("ping")); - - // add IDisposable interface - var disposable = mock.As<IDisposable>(); - disposable.Setup(d => d.Dispose()).Verifiable(); - - - Type of interface to cast the mock to. - - - - Raises the event referenced in using - the given and arguments. - - The arguments are - invalid for the target event invocation, or the is - not an event attach or detach expression. - - The following example shows how to raise a event: - - var mock = new Mock<IViewModel>(); - - mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); - - - - This example shows how to invoke an event with a custom event arguments - class in a view that will cause its corresponding presenter to - react by changing its state: - - var mockView = new Mock<IOrdersView>(); - var presenter = new OrdersPresenter(mockView.Object); - - // Check that the presenter has no selection by default - Assert.Null(presenter.SelectedOrder); - - // Raise the event with a specific arguments data - mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); - - // Now the presenter reacted to the event, and we have a selected order - Assert.NotNull(presenter.SelectedOrder); - Assert.Equal("moq", presenter.SelectedOrder.ProductName); - - - - - - Exposes the mocked object instance. - - - - - Holds extensions that would cause conflicts with new APIs if available - in the core Moq namespace (even if hidden), such as the SetupSet legacy - members. - - - - - Specifies a setup on the mocked type for a call to - to a property setter. - - - If more than one setup is set for the same property setter, - the latest one wins and is the one that will be executed. - - Type of the property. Typically omitted as it can be inferred from the expression. - Type of the mock. - The target mock for the setup. - Lambda expression that specifies the property setter. - - - mock.SetupSet(x => x.Suspended); - - - - - - Specifies a setup on the mocked type for a call to - to a property setter with a specific value. - - - More than one setup can be set for the setter with - different values. - - Type of the property. Typically omitted as it can be inferred from the expression. - Type of the mock. - The target mock for the setup. - Lambda expression that specifies the property setter. - The value to be set for the property. - - - mock.SetupSet(x => x.Suspended, true); - - - - - - Verifies that a property has been set on the mock. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given invocation - with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property. - mock.VerifySet(warehouse => warehouse.IsClosed); - - - The invocation was not performed on the mock. - Expression to verify. - The mock instance. - Mocked type. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property has been set on the mock to the given value. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given invocation - with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property to true - mock.VerifySet(warehouse => warehouse.IsClosed, true); - - - The invocation was not performed on the mock. - Expression to verify. - The value that should have been set on the property. - The mock instance. - Mocked type. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property has been set on the mock, specifying a failure - error message. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given invocation - with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property. - mock.VerifySet(warehouse => warehouse.IsClosed); - - - The invocation was not performed on the mock. - Expression to verify. - Message to show if verification fails. - The mock instance. - Mocked type. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Verifies that a property has been set on the mock to the given value, specifying a failure - error message. - Use in conjuntion with the default . - - - This example assumes that the mock has been used, - and later we want to verify that a given invocation - with specific parameters was performed: - - var mock = new Mock<IWarehouse>(); - // exercise mock - //... - // Will throw if the test code didn't set the IsClosed property to true - mock.VerifySet(warehouse => warehouse.IsClosed, true); - - - The invocation was not performed on the mock. - Expression to verify. - The value that should have been set on the property. - Message to show if verification fails. - The mock instance. - Mocked type. - Type of the property to verify. Typically omitted as it can - be inferred from the expression's return type. - - - - Provides partial evaluation of subtrees, whenever they can be evaluated locally. - - Matt Warren: http://blogs.msdn.com/mattwar - Documented by InSTEDD: http://www.instedd.org - - - - Performs evaluation and replacement of independent sub-trees - - The root of the expression tree. - A function that decides whether a given expression - node can be part of the local function. - A new tree with sub-trees evaluated and replaced. - - - - Performs evaluation and replacement of independent sub-trees - - The root of the expression tree. - A new tree with sub-trees evaluated and replaced. - - - - Evaluates and replaces sub-trees when first candidate is reached (top-down) - - - - - Performs bottom-up analysis to determine which nodes can possibly - be part of an evaluated sub-tree. - - - - - Marks a method as a matcher, which allows complete replacement - of the built-in class with your own argument - matching rules. - - - The argument matching is used to determine whether a concrete - invocation in the mock matches a given setup. This - matching mechanism is fully extensible. - - There are two parts of a matcher: the compiler matcher - and the runtime matcher. - - - Compiler matcher - Used to satisfy the compiler requirements for the - argument. Needs to be a method optionally receiving any arguments - you might need for the matching, but with a return type that - matches that of the argument. - - Let's say I want to match a lists of orders that contains - a particular one. I might create a compiler matcher like the following: - - - public static class Orders - { - [Matcher] - public static IEnumerable<Order> Contains(Order order) - { - return null; - } - } - - Now we can invoke this static method instead of an argument in an - invocation: - - var order = new Order { ... }; - var mock = new Mock<IRepository<Order>>(); - - mock.Setup(x => x.Save(Orders.Contains(order))) - .Throws<ArgumentException>(); - - Note that the return value from the compiler matcher is irrelevant. - This method will never be called, and is just used to satisfy the - compiler and to signal Moq that this is not a method that we want - to be invoked at runtime. - - - - Runtime matcher - - The runtime matcher is the one that will actually perform evaluation - when the test is run, and is defined by convention to have the - same signature as the compiler matcher, but where the return - value is the first argument to the call, which contains the - object received by the actual invocation at runtime: - - public static bool Contains(IEnumerable<Order> orders, Order order) - { - return orders.Contains(order); - } - - At runtime, the mocked method will be invoked with a specific - list of orders. This value will be passed to this runtime - matcher as the first argument, while the second argument is the - one specified in the setup (x.Save(Orders.Contains(order))). - - The boolean returned determines whether the given argument has been - matched. If all arguments to the expected method are matched, then - the setup matches and is evaluated. - - - - - - Using this extensible infrastructure, you can easily replace the entire - set of matchers with your own. You can also avoid the - typical (and annoying) lengthy expressions that result when you have - multiple arguments that use generics. - - - The following is the complete example explained above: - - public static class Orders - { - [Matcher] - public static IEnumerable<Order> Contains(Order order) - { - return null; - } - - public static bool Contains(IEnumerable<Order> orders, Order order) - { - return orders.Contains(order); - } - } - - And the concrete test using this matcher: - - var order = new Order { ... }; - var mock = new Mock<IRepository<Order>>(); - - mock.Setup(x => x.Save(Orders.Contains(order))) - .Throws<ArgumentException>(); - - // use mock, invoke Save, and have the matcher filter. - - - - - - Defines the Callback verb for property getter setups. - - - Mocked type. - Type of the property. - - - - Specifies a callback to invoke when the property is retrieved. - - Callback method to invoke. - - Invokes the given callback with the property value being set. - - mock.SetupGet(x => x.Suspended) - .Callback(() => called = true) - .Returns(true); - - - - - - Matcher to treat static functions as matchers. - - mock.Setup(x => x.StringMethod(A.MagicString())); - - pbulic static class A - { - [Matcher] - public static string MagicString() { return null; } - public static bool MagicString(string arg) - { - return arg == "magic"; - } - } - - Will success if: mock.Object.StringMethod("magic"); - and fail with any other call. - - - - - We need this non-generics base class so that - we can use from - generic code. - - - - - Implements the fluent API. - - - - - Implements the fluent API. - - - - - Implements the fluent API. - - - - - Defines the Callback verb and overloads for callbacks on - setups that return a value. - - Mocked type. - Type of the return value of the setup. - - - - Specifies a callback to invoke when the method is called. - - Callback method to invoke. - - The following example specifies a callback to set a boolean - value that can be used later: - - bool called = false; - mock.Setup(x => x.Execute()) - .Callback(() => called = true) - .Returns(true); - - Note that in the case of value-returning methods, after the Callback - call you can still specify the return value. - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation argument value. - - Notice how the specific string argument is retrieved by simply declaring - it as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute(It.IsAny<string>())) - .Callback((string command) => Console.WriteLine(command)) - .Returns(true); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>())) - .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)) - .Returns(true); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>())) - .Callback((string arg1, string arg2, int arg3) => Console.WriteLine(arg1 + arg2 + arg3)) - .Returns(true); - - - - - - Specifies a callback to invoke when the method is called that receives the original - arguments. - - Type of the first argument of the invoked method. - Type of the second argument of the invoked method. - Type of the third argument of the invoked method. - Type of the fourth argument of the invoked method. - Callback method to invoke. - - Invokes the given callback with the concrete invocation arguments values. - - Notice how the specific arguments are retrieved by simply declaring - them as part of the lambda expression for the callback: - - - mock.Setup(x => x.Execute( - It.IsAny<string>(), - It.IsAny<string>(), - It.IsAny<int>(), - It.IsAny<bool>())) - .Callback((string arg1, string arg2, int arg3, bool arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)) - .Returns(true); - - - - - - Implements the fluent API. - - - - - Defines the Never verb. - - - - - The expected invocation is never expected to happen. - - - - var mock = new Mock<ICommand>(); - mock.Setup(foo => foo.Execute("ping")) - .Never(); - - - - is always verified inmediately as - the invocations are performed, like strict mocks do - with unexpected invocations. - - - - - Implements the fluent API. - - - - - Implements the fluent API. - - - - - Defines the Returns verb for property get setups. - - Mocked type. - Type of the property. - - - - Specifies the value to return. - - The value to return, or . - - Return a true value from the property getter call: - - mock.SetupGet(x => x.Suspended) - .Returns(true); - - - - - - Specifies a function that will calculate the value to return for the property. - - The function that will calculate the return value. - - Return a calculated value when the property is retrieved: - - mock.SetupGet(x => x.Suspended) - .Returns(() => returnValues[0]); - - The lambda expression to retrieve the return value is lazy-executed, - meaning that its value may change depending on the moment the property - is retrieved and the value the returnValues array has at - that moment. - - - - - A that returns an empty default value - for non-mockeable types, and mocks for all other types (interfaces and - non-sealed classes) that can be mocked. - - - - - A that returns an empty default value - for invocations that do not have setups or return values, with loose mocks. - This is the default behavior for a mock. - - - - - Kind of range to use in a filter specified through - . - - - - - The range includes the to and - from values. - - - - - The range does not include the to and - from values. - - - - - Exception thrown by mocks when setups are not matched, - the mock is not properly setup, etc. - - - A distinct exception type is provided so that exceptions - thrown by the mock can be differentiated in tests that - expect other exceptions to be thrown (i.e. ArgumentException). - - Richer exception hierarchy/types are not provided as - tests typically should not catch or expect exceptions - from the mocks. These are typically the result of changes - in the tested class or its collaborators implementation, and - result in fixes in the mock setup so that they dissapear and - allow the test to pass. - - - - - - Supports the serialization infrastructure. - - Serialization information. - Streaming context. - - - - Supports the serialization infrastructure. - - Serialization information. - Streaming context. - - - - Made internal as it's of no use for - consumers, but it's important for - our own tests. - - - - - Used by the mock factory to accumulate verification - failures. - - - - - Supports the serialization infrastructure. - - - - - Options to customize the behavior of the mock. - - - - - Causes the mock to always throw - an exception for invocations that don't have a - corresponding setup. - - - - - Will never throw exceptions, returning default - values when necessary (null for reference types, - zero for value types or empty enumerables and arrays). - - - - - Default mock behavior, which equals . - - - - - Implements the fluent API. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. - - - - - Looks up a localized string similar to Value cannot be an empty string.. - - - - - Looks up a localized string similar to Can only add interfaces to the mock.. - - - - - Looks up a localized string similar to Can't set return value for void method {0}.. - - - - - Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. - - - - - Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. - - - - - Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. - - - - - Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . - - - - - Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. - Please cast the argument to one of the supported types: {1}. - Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. - - - - - Looks up a localized string similar to Member {0}.{1} does not exist.. - - - - - Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: - mock.Setup(x => x.{1}()); - . - - - - - Looks up a localized string similar to {0} invocation failed with mock behavior {1}. - {2}. - - - - - Looks up a localized string similar to Expected only {0} calls to {1}.. - - - - - Looks up a localized string similar to Expected only one call to {0}.. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock less than {2} times: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was not performed on the mock: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock more than {3} times: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock more than a time: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock less or equal than {2} times or more or equal than {3} times: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock less than {2} times or more than {3} times: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was not performed on the mock {2} times: {1}. - - - - - Looks up a localized string similar to {0} - Invocation was performed on the mock: {1}. - - - - - Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. - - - - - Looks up a localized string similar to Object instance was not created by Moq.. - - - - - Looks up a localized string similar to Property {0}.{1} does not exist.. - - - - - Looks up a localized string similar to Property {0}.{1} is write-only.. - - - - - Looks up a localized string similar to Property {0}.{1} is read-only.. - - - - - Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. - - - - - Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. - - - - - Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. - - - - - Looks up a localized string similar to Invocation {0} should not have been made.. - - - - - Looks up a localized string similar to Expression is not a method invocation: {0}. - - - - - Looks up a localized string similar to Expression is not a property access: {0}. - - - - - Looks up a localized string similar to Expression is not a property setter invocation.. - - - - - Looks up a localized string similar to Invalid setup on a non-overridable member: - {0}. - - - - - Looks up a localized string similar to Type {0} does not implement required interface {1}. - - - - - Looks up a localized string similar to Type {0} does not from required type {1}. - - - - - Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: - mock.Setup(x => x.{1}).Returns(value); - mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one - mock.SetupSet(x => x.{1}).Callback(callbackDelegate); - . - - - - - Looks up a localized string similar to Expression {0} is not supported.. - - - - - Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. - - - - - Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. - - - - - Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. - - - - - Looks up a localized string similar to Member {0} is not supported for protected mocking.. - - - - - Looks up a localized string similar to Setter expression can only use static custom matchers.. - - - - - Looks up a localized string similar to To specify a setup for protected property {0}.{1}, use: - mock.Setup<{2}>(x => x.{1}).Returns(value); - mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one - mock.SetupSet(x => x.{1}).Callback(callbackDelegate);. - - - - - Looks up a localized string similar to The following setups were not matched: - {0}. - - - - - Defines the number of invocations allowed by a mocked method. - - - - - Specifies that a mocked method should be invoked times as minimum. - - The minimun number of times. - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should be invoked one time as minimum. - - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should be invoked time as maximun. - - The maximun number of times. - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should be invoked one time as maximun. - - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should be invoked between and - times. - - The minimun number of times. - The maximun number of times. - The kind of range. See . - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should be invoked exactly times. - - The times that a method or property can be called. - An object defining the allowed number of invocations. - - - - Specifies that a mocked method should not be invoked. - - An object defining the allowed number of invocations. - - - - Determines the way default values are generated - calculated for loose mocks. - - - - - Default behavior, which generates empty values for - value types (i.e. default(int)), empty array and - enumerables, and nulls for all other reference types. - - - - - Whenever the default value generated by - is null, replaces this value with a mock (if the type - can be mocked). - - - For sealed classes, a null value will be generated. - - - - - Allows setups to be specified for protected members by using their - name as a string, rather than strong-typing them which is not possible - due to their visibility. - - - - - Specifies a setup for a void method invocation with the given - , optionally specifying - arguments for the method call. - - Name of the void method to be invoke. - Optional arguments for the invocation. If argument matchers are used, - remember to use rather than . - - - - Specifies a setup for an invocation on a property or a non void method with the given - , optionally specifying - arguments for the method call. - - Name of the method or property to be invoke. - Optional arguments for the invocation. If argument matchers are used, - remember to use rather than . - Return type of the method or property. - - - - Specifies a setup for an invocation on a property getter with the given - . - - Name of the property. - Type of the property. - - - - Specifies a setup for an invocation on a property setter with the given - . - - Name of the property. - Type of the property. - - - - Implements the actual interception and method invocation for - all mocks. - - - - - Get an eventInfo for a given event name. Search type ancestors depth first if necessary. - - Name of the event, with the set_ or get_ prefix already removed - - - - Given a type return all of its ancestors, both types and interfaces. - - The type to find immediate ancestors of - - - - Casts the expression to a lambda expression, removing - a cast if there's any. - - - - - Casts the body of the lambda expression to a . - - If the body is not a method call. - - - - Converts the body of the lambda expression into the referenced by it. - - - - - Checks whether the body of the lambda expression is a property access. - - - - - Checks whether the expression is a property access. - - - - - Checks whether the body of the lambda expression is a property indexer, which is true - when the expression is an whose - has - equal to . - - - - - Checks whether the expression is a property indexer, which is true - when the expression is an whose - has - equal to . - - - - - Creates an expression that casts the given expression to the - type. - - - - - TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 - is fixed. - - - - - Implements the fluent API. - - - - - Defines the Callback verb for property setter setups. - - Type of the property. - - - - Specifies a callback to invoke when the property is set that receives the - property value being set. - - Callback method to invoke. - - Invokes the given callback with the property value being set. - - mock.SetupSet(x => x.Suspended) - .Callback((bool state) => Console.WriteLine(state)); - - - - - - Tracks the current mock and interception context. - - - - - - - - - - - - - Enables the Protected() method on , - allowing setups to be set for protected members by using their - name as a string, rather than strong-typing them which is not possible - due to their visibility. - - - - - Enable protected setups for the mock. - - Mocked object type. Typically omitted as it can be inferred from the mock instance. - The mock to set the protected setups on. - - - - Allows the specification of a matching condition for an - argument in a protected member setup, rather than a specific - argument value. "ItExpr" refers to the argument being matched. - - - Use this variant of argument matching instead of - for protected setups. - This class allows the setup to match a method invocation - with an arbitrary value, with a value in a specified range, or - even one that matches a given predicate, or null. - - - - - Matches a null value of the given type. - - - Required for protected mocks as the null value cannot be used - directly as it prevents proper method overload selection. - - - - // Throws an exception for a call to Remove with a null string value. - mock.Protected() - .Setup("Remove", ItExpr.IsNull<string>()) - .Throws(new InvalidOperationException()); - - - Type of the value. - - - - Matches any value of the given type. - - - Typically used when the actual argument value for a method - call is not relevant. - - - - // Throws an exception for a call to Remove with any string value. - mock.Protected() - .Setup("Remove", ItExpr.IsAny<string>()) - .Throws(new InvalidOperationException()); - - - Type of the value. - - - - Matches any value that satisfies the given predicate. - - Type of the argument to check. - The predicate used to match the method argument. - - Allows the specification of a predicate to perform matching - of method call arguments. - - - This example shows how to return the value 1 whenever the argument to the - Do method is an even number. - - mock.Protected() - .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) - .Returns(1); - - This example shows how to throw an exception if the argument to the - method is a negative number: - - mock.Protected() - .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) - .Throws(new ArgumentException()); - - - - - - Matches any value that is in the range specified. - - Type of the argument to check. - The lower bound of the range. - The upper bound of the range. - The kind of range. See . - - The following example shows how to expect a method call - with an integer argument within the 0..100 range. - - mock.Protected() - .Setup("HasInventory", - ItExpr.IsAny<string>(), - ItExpr.IsInRange(0, 100, Range.Inclusive)) - .Returns(false); - - - - - - Matches a string argument if it matches the given regular expression pattern. - - The pattern to use to match the string argument value. - - The following example shows how to expect a call to a method where the - string argument matches the given regular expression: - - mock.Protected() - .Setup("Check", ItExpr.IsRegex("[a-z]+")) - .Returns(1); - - - - - - Matches a string argument if it matches the given regular expression pattern. - - The pattern to use to match the string argument value. - The options used to interpret the pattern. - - The following example shows how to expect a call to a method where the - string argument matches the given regular expression, in a case insensitive way: - - mock.Protected() - .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) - .Returns(1); - - - - - - Checks an argument to ensure it isn't null. - - The argument value to check. - The name of the argument. - - - - Checks a string argument to ensure it isn't null or empty. - - The argument value to check. - The name of the argument. - - - - Checks an argument to ensure it is in the specified range including the edges. - - Type of the argument to check, it must be an type. - - The argument value to check. - The minimun allowed value for the argument. - The maximun allowed value for the argument. - The name of the argument. - - - - Checks an argument to ensure it is in the specified range excluding the edges. - - Type of the argument to check, it must be an type. - - The argument value to check. - The minimun allowed value for the argument. - The maximun allowed value for the argument. - The name of the argument. - - - diff --git a/Samples/Lib/System.Web.Abstractions.dll b/Samples/Lib/System.Web.Abstractions.dll deleted file mode 100644 index 317242e72..000000000 Binary files a/Samples/Lib/System.Web.Abstractions.dll and /dev/null differ diff --git a/Samples/Lib/System.Web.Mvc.dll b/Samples/Lib/System.Web.Mvc.dll deleted file mode 100644 index 10b038f24..000000000 Binary files a/Samples/Lib/System.Web.Mvc.dll and /dev/null differ diff --git a/Samples/Lib/System.Web.Mvc.xml b/Samples/Lib/System.Web.Mvc.xml deleted file mode 100644 index a5885c243..000000000 --- a/Samples/Lib/System.Web.Mvc.xml +++ /dev/null @@ -1,3136 +0,0 @@ - - - - System.Web.Mvc - - - - - Class used to render a view using an returned by a . - - - - - Base class used to supply the model to the view and then render the view to the response. - - - - - Encapsulates the result of an action method and is used to perform a - framework level operation on the action method's behalf. - - - - - Enables processing of the result of an action method by a custom type that inherits from . - - - - - - When called by the action invoker, renders the view to the response. - - - - - - When overridden, returns the used to render the view. - - - - - - - Gets or sets the for this result. - - - - - Gets or sets the that is rendered to the response. - - - - - Gets or sets the view data for this result. - - - - - Gets or sets the view engines () associated with this result. - - - - - The name of the view to be rendered. - - - - - Searches the registered view engines and returns the used to render the view. - - - - - - - The name of the master view (such as a master page or template) to use when rendering the view. - - - - - Defines the contract for an action invoker, used to invoke an action in response to an http request. - - - - - Invokes the specified action. - - - The name of the action. - True if the action was found, otherwise false. - - - - Renders the specified partial view. - - - The name of the partial view - - - - Renders the specified partial view replacing its ViewData property with the - supplied ViewDataDictionary. - - - The name of the partial view - - - - Renders the specified partial view passing in a copy of the current - ViewDataDictionary, but - with the Model property set to the specified model. - - - The name of the partial view - - - - Renders the specified partial view, replacing the partial view's ViewData property with the - supplied ViewDataDictionary. The Model - property of the view data is set to the specified model. - - - The name of the partial view - The model for the partial view - The view data for the partial view - - - - Sends binary content to the response via a . - - - - - Base class used to send binary content to the response - - - - - The content type to use for the response. - - - - - If specified, sets the content-disposition header so that a file download dialog appears in the browesr with the specified file name. - - - - - Initializes a new instance of - - The stream to send to the response - The content type to use for the response - - - - Gets the stream which will be sent to the response. - - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - The host name for the URL - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route. - An object containing the html attributes for the element. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route.. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. - An object containing the html attributes for the element. - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - The host name for the URL - - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the url to the specified action such that when the action link is clicked, - the action is invoked asynchronously via javascript. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. - An object containing the html attributes for the element. - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - The host name for the URL - - An object providing options for the asynchronous request - An anchor tag - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - An object containing the parameters for a route. - An object containing the html attributes for the element. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the action - The name of the controller - An object containing the parameters for a route - An object containing the html attributes for the element - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the route to used to obtain the form post url. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. - An object providing options for the asynchronous request - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. The form is submitted asynchronously using javascript. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. - An object containing the html attributes for the element. - An object providing options for the asynchronous request - An instance. - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - An object containing the parameters for a route. - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - An object containing the parameters for a route. - An object providing options for the asynchronous request - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object providing options for the asynchronous request - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object providing options for the asynchronous request - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object providing options for the asynchronous request - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. - An object providing options for the asynchronous request - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. - An object providing options for the asynchronous request - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values such that when the link is clicked, - a request is made to the virtual path asynchronously via javascript. - - - The inner text of the anchor tag - The name of the route to used to obtain the form post url. - The protocol for the URL such as "http" or "https" - The host name for the URL - The url fragment name (also known as anchor name) - An object containing the parameters for a route. - An object providing options for the asynchronous request - An object containing the html attributes for the element - An anchor tag - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The current request for action '{0}' on controller type '{1}' is ambiguous between the following action methods:{2}. - - - - - Looks up a localized string similar to {0} on type {1}. - - - - - Looks up a localized string similar to No route in the route table matches the supplied values.. - - - - - Looks up a localized string similar to A required anti-forgery token was not supplied or was invalid.. - - - - - Looks up a localized string similar to The value '{0}' is outside the valid range of the enumeration type '{1}'.. - - - - - Looks up a localized string similar to Value cannot be null or empty.. - - - - - Looks up a localized string similar to The partial view '{0}' could not be found. The following locations were searched:{1}. - - - - - Looks up a localized string similar to The property '{0}' cannot be null or empty.. - - - - - Looks up a localized string similar to The value '{0}' is invalid.. - - - - - Looks up a localized string similar to The view '{0}' or its master could not be found. The following locations were searched:{1}. - - - - - Looks up a localized string similar to A public action method '{0}' could not be found on controller '{1}'.. - - - - - Looks up a localized string similar to The model of type '{0}' was not successfully updated.. - - - - - Looks up a localized string similar to There was an error creating the IControllerFactory '{0}'. Check that it has a public parameterless constructor.. - - - - - Looks up a localized string similar to The IControllerFactory '{0}' did not return a controller for a controller named '{1}'.. - - - - - Looks up a localized string similar to The controller factory type '{0}' must implement the IControllerFactory interface.. - - - - - Looks up a localized string similar to The controller name '{0}' is ambiguous between the following types:{1}. - - - - - Looks up a localized string similar to An error occurred while creating a controller of type '{0}'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.. - - - - - Looks up a localized string similar to The controller for path '{0}' could not be found or it does not implement IController.. - - - - - Looks up a localized string similar to The controller type '{0}' must implement IController.. - - - - - Looks up a localized string similar to A value is required.. - - - - - Looks up a localized string similar to The total number of ticks for the TimeSpan must be greater than 0.. - - - - - Looks up a localized string similar to The type '{0}' does not inherit from Exception.. - - - - - Looks up a localized string similar to Order must be greater than or equal to -1.. - - - - - Looks up a localized string similar to There is no ViewData item with the key '{0}' of type '{1}'.. - - - - - Looks up a localized string similar to The value must be greater than or equal to zero.. - - - - - Looks up a localized string similar to The ViewData item with the key '{0}' is of type '{1}' but needs to be of type '{2}'.. - - - - - Looks up a localized string similar to There was an error creating the IModelBinder '{0}'. Check that it has a public parameterless constructor.. - - - - - Looks up a localized string similar to The type '{0}' does not implement the IModelBinder interface.. - - - - - Looks up a localized string similar to The type '{0}' contains multiple attributes inheriting from CustomModelBinderAttribute.. - - - - - Looks up a localized string similar to Cannot create a descriptor for instance method '{0}' on type '{1}' since the type does not subclass ControllerBase.. - - - - - Looks up a localized string similar to Cannot call action method '{0}' on controller '{1}' since the parameter '{2}' is passed by reference.. - - - - - Looks up a localized string similar to Cannot call action method '{0}' on controller '{1}' since it is a generic method.. - - - - - Looks up a localized string similar to The parameters dictionary contains a null entry for parameter '{0}' of non-nullable type '{1}' for method '{2}' in '{3}'. To make a parameter optional its type should be either a reference type or a Nullable type.. - - - - - Looks up a localized string similar to The parameters dictionary does not contain an entry for parameter '{0}' of type '{1}' for method '{2}' in '{3}'. The dictionary must contain an entry for each parameter, even parameters with null values.. - - - - - Looks up a localized string similar to The parameters dictionary contains an invalid entry for parameter '{0}' for method '{1}' in '{2}'. The dictionary contains a value of type '{3}', but the parameter requires a value of type '{4}'.. - - - - - Looks up a localized string similar to The parameter '{0}' on method '{1}' contains multiple attributes inheriting from CustomModelBinderAttribute.. - - - - - Looks up a localized string similar to The SessionStateTempDataProvider requires SessionState to be enabled.. - - - - - Looks up a localized string similar to The parameter conversion from type '{0}' to type '{1}' failed. See the inner exception for more information.. - - - - - Looks up a localized string similar to The parameter conversion from type '{0}' to type '{1}' failed because no TypeConverter can convert between these types.. - - - - - Looks up a localized string similar to The model item passed into the dictionary is of type '{0}' but this dictionary requires a model item of type '{1}'.. - - - - - Looks up a localized string similar to A ViewMasterPage can only be used with content pages that derive from ViewPage or ViewPage<TViewItem>.. - - - - - Looks up a localized string similar to The ViewUserControl '{0}' cannot find an IViewDataContainer. The ViewUserControl must be inside a ViewPage, ViewMasterPage, or another ViewUserControl.. - - - - - Looks up a localized string similar to A ViewUserControl can only be used inside pages that derive from ViewPage or ViewPage<TViewItem>.. - - - - - Looks up a localized string similar to A master name cannot be specified when the view is a ViewUserControl.. - - - - - Looks up a localized string similar to The view found at '{0}' could not be created.. - - - - - Looks up a localized string similar to The view at '{0}' must derive from ViewPage, ViewPage<TViewData>, ViewUserControl, or ViewUserControl<TViewData>.. - - - - - Instantiates and initializes the Ajax, Html, and Url properties. - - - - - Renders the view page to the response. - - - - - - Returns an containing methods useful for AJAX scenarios. - - - - - Returns an containing methods useful for rendering HTML elements. - - - - - Convenience property used to access the Model property of the - - - - - Returns a which renders the supplied content to the response. - - The content to write to the response - - - - - Returns a which renders the supplied content to the response. - - The content to write to the response - The content type - - - - - Returns a which renders the supplied content to the response. - - The content to write to the response - The content type - The content encoding - - - - - Returns a which writes the fileContents to the Response. - - The binary content to send to the response. - The content type. - - - - - Returns a which writes the fileContents to the Response. - - The binary content to send to the response. - The content type. - If specified, sets the content-disposition header so that a file download dialog appears in the browesr with the specified file name - - - - - Returns a which writes the fileStream to the Response. - - The stream to send to the response. - The content type - - - - - Returns a which writes the fileStream to the Response. - - The stream to send to the response. - The content type - If specified, sets the content-disposition header so that a file download dialog appears in the browesr with the specified file name - - - - - Returns a which writes the file to the Response. - - The path to the file to send to the response. - The content type - - - - - Returns a which writes the file to the Response. - - The path to the file to send to the response. - The content type - If specified, sets the content-disposition header so that a file download dialog appears in the browesr with the specified file name - - - - - Method called whenever a request matches this controller, but not an action of this controller. - - The name of the attempted action - - - - Returns a which writes a script to the response - which is then executed on the client. - - The JavaScript code to run on the client - - - - - Returns a which serializes the specified object to - JSON and writes the JSON to the response. - - The JavaScript code to run on the client - - - - - Returns a which serializes the specified object to - JSON and writes the JSON to the response. - - The JavaScript code to run on the client - The content type - - - - - Returns a which serializes the specified object to - JSON and writes the JSON to the response. - - The JavaScript code to run on the client - The content type - The content encoding - - - - - Method called before the action method is invoked. - - Contains information about the current request and action - - - - Method called after the action method is invoked. - - Contains information about the current request and action - - - - Method called when authorization occurs. - - Contains information about the current request and action - - - - Method called when an unhandled exception occurs in the action. - - Contains information about the current request and action - - - - Method called after the action result returned by an action method is executed. - - Contains information about the current request and action result - - - - Method called before the action result returned by an action method is executed. - - Contains information about the current request and action result - - - - Returns a which renders a partial view to the response. - - - - - - Returns a which renders a partial view to the response. - - The model rendered by the partial view - - - - Returns a which renders a partial view to the response. - - The name of the partial view - - - - Returns a which renders a partial view to the response. - - The name of the partial view - The model rendered by the partial view - - - - Returns a which redirects to the specified URL - - The URL to redirect to. - - - - - Returns a which redirects to the specified action - - The name of the action. - - - - - Returns a which redirects to the specified action - - The name of the action. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - - - - Returns a which redirects to the specified action - - The name of the action. - An object containing the parameters for a route. - - - - - Returns a which redirects to the specified action - - The name of the action. - The name of the controller - - - - - Returns a which redirects to the specified action - - The name of the action. - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - - - - Returns a which redirects to the specified action - - The name of the action. - The name of the controller - An object containing the parameters for a route. - - - - - Returns a which redirects to the specified route - - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - - - - Returns a which redirects to the specified route - - An object containing the parameters for a route. - - - - - Returns a which redirects to the specified route - - The name of the route - - - - - Returns a which redirects to the specified route - - The name of the route - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - - - - - Returns a which redirects to the specified route - - The name of the route - An object containing the parameters for a route. - - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - List of properties of the model to update - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - List of properties of the model to update - Prefix to use when looking up values in the value provider - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - List of properties to explicitly exclude from update. These are excluded even if they are listed in the includeProperties list - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - List of properties of the model to update - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - Returns true if successful. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - List of properties to explicitly exclude from update. These are excluded even if they are listed in the includeProperties list - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - List of properties of the model to update - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - List of properties to explicitly exclude from update. These are excluded even if they are listed in the includeProperties list - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - List of properties of the model to update - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - A dictionary of values used to update the model - - - - Updates the specified model instance using values from the Controller's current ValueProvider. - - The type of the model object - The model instance to update. - Prefix to use when looking up values in the value provider - List of properties of the model to update - List of properties to explicitly exclude from update. These are excluded even if they are listed in the includeProperties list - A dictionary of values used to update the model - - - - Returns a which renders a view to the response. - - - - - - Returns a which renders a view to the response. - - The model rendered by the view - - - - - Returns a which renders a view to the response. - - The name of the partial view - - - - - Returns a which renders a view to the response. - - The name of the view - The name of the master view - - - - - Returns a which renders a view to the response. - - The name of the view - The model rendered by the view - - - - - Returns a which renders a view to the response. - - The name of the view - The name of the master view - The model rendered by the view - - - - - Returns a which renders the specified to the response. - - The view rendered to the response - - - - - Returns a which renders the specified to the response. - - The view rendered to the response - The model rendered by the view - - - - - Gets the for the controller. - - - - - Encapsulates all HTTP-specific information about an individual HTTP request. - - - - - Gets the object containing the - state of the model and model binding validation. - - - - - Gets the object for the current HTTP request. - - - - - Gets the object for the current HTTP request. - - - - - Returns the for the current request. - - - - - Gets the object that provides methods used in processing Web requests. - - - - - Gets the object for the current HTTP request. - - - - - Gets the object used to store data for the next request. - - - - - Gets the object used to generate URLs using Routing. - - - - - Gets the security information for the current HTTP request. - - - - - Class containing convenience methods for use in rendering HTML for use in Ajax scenarios within a view. - - - - - Gets the collection of routes. - - - - - Gets the current . - - - - - Gets the current . - - - - - Gets the current . - - - - - Encapsulates information related to rendering a view. - - - - - Encapsulates information about an HTTP request that matches a defined Route and Controller. - - - - - Gets data associated with this request which only lives for one request. - - - - - Gets the to render. - - - - - Gets the view data supplied to the view. - - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - An object containing the parameters for a route - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - The name of the controller - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path to the specified action. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the url to the specified action. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - The host name for the URL - An anchor tag - - - - Returns an anchor tag containing the url to the specified action. - - The inner text of the anchor tag - The name of the action - The name of the controller - An object containing the parameters for a route - An object containing the html attributes for the element - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - The host name for the URL - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - An object containing the parameters for a route - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the virtual path for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - An object containing the parameters for a route - An object containing the html attributes for the element - An anchor tag - - - - Returns an anchor tag containing the url for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - The host name for the URL - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An anchor tag - - - - Returns an anchor tag containing the url for the specified route values. - - The inner text of the anchor tag - The name of the route used to return a virtual path. - The host name for the URL - The protocol for the URL such as "http" or "https" - The url fragment name (also known as anchor name) - An object containing the parameters for a route - An object containing the html attributes for the element - An anchor tag - - - - Represents the state of an attempt to bind a posted form to an action method including validation information. - - - - - Initializes a new instance of the class - - - - - Initializes a new instance of the class with the values copied - from the the specified ModelStateDictionary. - - - - - Adds the specified to the errors collection for the - associated with the specified key. - - - - - - - Adds the specified error message to the errors collection for the - associated with the specified key. - - - - - - - Returns true if there are any associated or prefixed with the specified key. - - - - - - - Copies the values from the specified into this - dictionary, overwriting existing values in cases where the keys are the same. - - - - - - Sets the value for the specified key using the specified - - - - - - - Gets the number of key/value pairs that are in the collection. - - - - - Returns true if there are no errors, otherwise false. - - - - - Gets a collection that contains the keys in the dictionary. - - - - - Gets or sets the value that is associated with the specified key. - - - - - - - Gets a collection that contains the values in the dictionary. - - - - - Initializes a new instance of the class. - - An object that contains information about the current request and the defined route it matched. - - - - Initializes a new instance of the class. - - An object that contains information about the current request and the defined route it matched. - A collection of Route instances. - - - - Returns a virtual path for the specified route values. - - The name of the action - The virtual path to the action - - - - Returns a virtual path URL for the specified route values. - - The name of the action - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The virtual path to the action - - - - Returns a virtual path for the specified route values. - - The name of the action - An object containing the parameters for a route. - The virtual path to the action - - - - Returns a virtual path for the specified route values. - - The name of the action - The name of the controller - The virtual path to the action - - - - Returns a virtual path for the specified route values. - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The virtual path to the action - - - - Returns a virtual path for the specified route values. - - The name of the action - The name of the controller - An object containing the parameters for a route. - The protocol for the URL such as "http" or "https" - The virtual path to the action - - - - Returns a fully qualified URL for the specified route values. - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The protocol for the URL such as "http" or "https" - The URL to the action - - - - Returns a fully qualified URL for the specified route values. - - The name of the action - The name of the controller - An object containing the parameters for a route - The protocol for the URL such as "http" or "https" - The host name for the URL - The URL to the action - - - - Converts a virtual path to an application absolute path. - - - If the specified does not start with the tilde [~] character, - then this method returns the specified unchanged. - - The virtual path to the content. - - - - - Encodes a URL string - - The text to encode - An encoded string - - - - Returns a virtual path for the specified route values. - - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - A virtual path - - - - Returns a virtual path for the specified route values. - - An object containing the parameters for a route. - A virtual path - - - - Returns a virtual path for the specified route values. - - The name of the route used to return a virtual path. - A virtual path - - - - Returns a virtual path for the specified route values. - - The name of the route used to return a virtual path. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - A virtual path - - - - Returns a virtual path for the specified route values. - - The name of the route used to return a virtual path. - An object containing the parameters for a route. - A virtual path - - - - Returns a fully qualified URL for the specified route values. - - The name of the route used to return a virtual path. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The protocol for the URL such as "http" or "https" - A virtual path - - - - Returns a fully qualified URL for the specified route values. - - The name of the route used to generate the virtual path - The name of the controller - An object containing the parameters for a route - The protocol for the URL such as "http" or "https" - The host name for the URL - The virtual path to the action - - - - Encapsulates information about an HTTP request that matches a defined route. - - - - - A collection containing the routes registered for the application. - - - - - Class containing convenience methods for use in rendering HTML in a view. - - - - - Returns the string for a hidden input containing a token used to prevent CSRF attacks. - - - - - - Returns the string for a hidden input containing a token used to prevent CSRF attacks. - - A salt to use when generating the token - - - - - Method used to encode HTML attribute values. - - The string to encode - - - - - Method used to encode HTML attribute values. - - The object to encode - - - - - Method used to encode HTML. - - The string to encode - - - - - Method used to encode HTML. - - The object to encode - - - - - Convenience method used to generate a link using Routing to determine the virtual path. - - The current - The collection of routes. - The text displayed in the link - The name of the route, if any. - The name of the action. - The name of the controller. - The route values - The html attributes - - - - - Convenience method used to generate a link using Routing to determine the URL. - - The current - The collection of routes. - The text displayed in the link - The name of the route, if any. - The name of the action. - The name of the controller. - The route values - The html attributes - The protocol to use, such as http or https. - The hostname for the URL - The fragment to append to the end of the URL - - - - - Convenience method which converts the value into a string. - - - - - - - Convenience method for converting the value to a string - - - - - - - Gets or sets the string which replaces the dot character in the ID of html elements generated by HTML helpers. - - - - - Gets the collection of routes. - - - - - Gets the current . - - - - - Gets the current . - - - - - Gets the current . - - - - - A collection of instances. - - - - - Adds an to the - - - - - - Adds an error message to the - - - - - - When applied to an action method, specifies which HTTP verbs the method will respond to. - - - - - Gets the list of HTTP verbs the action method will respond to. - - - - - Represents an error that occured while attempting to bind a request to the arguments of an action method. - - - - - Initializes a new instance of the class with the specified exception. - - - For security reasons, the exception's ErrorMessage property is not set to the - Exception's Message property by default. - - - - - - Initializes a new instance of the class with the specified exception and error message. - - - - - - - Initializes a new instance of the class with the specified error message. - - - - - - The , if any, that occurred while binding to the model. - - - - - - - - - - Represents the result of an attempt to bind a supplied value (from a form post, query string, etc...) to - a property of an argument to an action method or to the argument itself. - - - - - Initializes a new instance of the class with the specified - raw value, attempted value, and . - - - - - - - - Converts the value encapsulated by this result to the specified type. - - The target type - - - - - Converts the value encapsulated by this result to the specified type. - - The target type - The culture to use in the conversion. - - - - - The RawValue converted to a string for display purposes. - - - - - The raw value supplied by the value provider. - - - - - Sends binary content to the response. - - - - - Initializes a new instance of with the specified file contents and content type. - - The byte array to send to the response - The content type to use for the response - - - - The binary content to send to the response. - - - - - Class used by the Html helpers to build HTML tags. - - - - - Encapsulates the state of model binding to a property of an argument, or the argument itself, of an action method. - - - - - Returns a which encapsulates the value which was attempted to be bound by model binding. - - - - - Returns a containing any errors that occurred during model binding. - - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - An object containing the html attributes for the element - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - The number of columns - The number of rows - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An textarea tag - - - - Returns a textarea tag suitable for entering multiline input. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - The number of columns - The number of rows - An object containing the html attributes for the element - An textarea tag - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - An object containing the parameters for a route - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the action - The name of the controller - An object containing the parameters for a route - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - An object containing the parameters for a route - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route - The HTTP method for the form post, either Get or Post - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route. The parameters are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax. - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An instance. - - - - Writes a begin form tag to the response while returning an - instance. Can be used in a using block in which case it renders the end form tag at the end of the - using block. - - - The name of the route to used to obtain the form post url. - An object containing the parameters for a route - The HTTP method for the form post, either Get or Post - An object containing the html attributes for the element - An instance. - - - - Renders the end form tag to the response. This provides an alternative way to end the form - to using a using block with and . - - - - - - Sends the contents of a file to the response. - - - - - Initializes an instance of with the specified file name and content type. - - The name of the file to send to the response. - The content type of the response. - - - - The path to the file which is sent to the response. - - - - - Represents a result that doesn't do anything, like a controller action returning null. - - - This follows a pattern known as the Null Object pattern - - - - - Defines the contract for temp data providers which store data viewed on the next request. - - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - An empty string if valid, otherwise a span with an error message - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An empty string if valid, otherwise a span with an error message - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - The message to display if the specified field is in error - An empty string if valid, otherwise a span with an error message - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - The message to display if the specified field is in error - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An empty string if valid, otherwise a span with an error message - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - An object containing the html attributes for the element - An empty string if valid, otherwise a span with an error message - - - - Displays a validation message if the specified field contains an error in the ModelState. - - - The name of the property or model object being validated - The message to display if the specified field is in error - An object containing the html attributes for the element - An empty string if valid, otherwise a span with an error message - - - - Returns an unordered list [ul] of validation messages within the ModelState. - - - - - - - Returns an unordered list [ul] of validation messages within the ModelState. - - - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - - - - Returns an unordered list [ul] of validation messages within the ModelState. - - - An object containing the html attributes for the element - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - Provides the text for a default empty valued option, if it is not null. - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - Provides the text for a default empty valued option, if it is not null. - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - Provides the text for a default empty valued option, if it is not null. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - An object containing the html attributes for the element. - - - - - Returns a select tag used to select a single option from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - Provides the text for a default empty valued option, if it is not null. - An object containing the html attributes for the element. - - - - - Returns a select tag used to select a multiple options from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - - - - - Returns a select tag used to select a multiple options from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - - - - - Returns a select tag used to select a multiple options from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - - - - Returns a select tag used to select a multiple options from a set of possible choices. - - - The name of the form field and used as a key to lookup possible options. If ViewData[name] implements IEnumerable of . - The enumeration of SelectListItem instances used to populate the drop down. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - - - - - Returns the input tag for a checkbox. - - - The form field name - An input tag with the type set to "checkbox" - - - - Returns the input tag for a checkbox. - - - The form field name - A boolean indicating whether or not the checkbox is checked - An input tag with the type set to "checkbox" - - - - Returns the input tag for a checkbox. - - - The form field name - A boolean indicating whether or not the checkbox is checked - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "checkbox" - - - - Returns the input tag for a checkbox. - - - The form field name - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "checkbox" - - - - Returns the input tag for a checkbox. - - - The form field name - An object containing the html attributes for the element - An input tag with the type set to "checkbox" - - - - Returns the input tag for a checkbox. - - - The form field name - A boolean indicating whether or not the checkbox is checked - An object containing the html attributes for the element - An input tag with the type set to "checkbox" - - - - Returns a hidden input tag. - - - The form field name and ViewData key used to lookup the value. - An input tag with the type set to "hidden" - - - - Returns a hidden input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the hidden input. If null, looks at the ViewData and then ModelStatefor the value. - An input tag with the type set to "hidden" - - - - Returns a hidden input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the hidden input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "hidden" - - - - Returns a hidden input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the hidden input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element - An input tag with the type set to "hidden" - - - - Returns a password tag. - - - The form field name and ViewData key used to lookup the value. - An input tag with the type set to "password" - - - - Returns a password tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An input tag with the type set to "password" - - - - Returns a password tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "password" - - - - Returns a password tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element - An input tag with the type set to "password" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - An input tag with the type set to "radio" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "radio" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - An object containing the html attributes for the element - An input tag with the type set to "radio" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - Whether or not the radio button is checked - An input tag with the type set to "radio" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - Whether or not the radio button is checked - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "radio" - - - - Returns a radio button tag used to present one possible value, out of a range, for a form field specified by the name. - - - The form field name and ViewData key used to lookup the current value. - If checked, the value of the radio button submitted when the form is posted. If the value in ViewData or ModelState matches this value, the radio button is checked. - Whether or not the radio button is checked - An object containing the html attributes for the element - An input tag with the type set to "radio" - - - - Returns a text input tag. - - - The form field name and ViewData key used to lookup the value. - An input tag with the type set to "text" - - - - Returns a text input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An input tag with the type set to "text" - - - - Returns a text input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element. The attributes are retrieved via reflection by examining the properties of the object. Typically created using object initializer syntax - An input tag with the type set to "text" - - - - Returns a text input tag. - - - The form field name and ViewData key used to lookup the value. - The value of the input. If null, looks at the ViewData and then ModelStatefor the value. - An object containing the html attributes for the element - An input tag with the type set to "text" - - - - Initializes a new instance of the - with the specified . - - - - - - Attribute used to provide details on how model binding to a parameter should occur. - - - - - A comma delimited black list of property names for which binding is not allowed. - - - - - A comma delimited white list of property names for which binding is allowed. - - - - - Gets or sets the prefix to use when binding to an action argument or model property. - - - - diff --git a/Samples/Lib/System.Web.Routing.dll b/Samples/Lib/System.Web.Routing.dll deleted file mode 100644 index 93f0ff81b..000000000 Binary files a/Samples/Lib/System.Web.Routing.dll and /dev/null differ diff --git a/Samples/Lib/nunit.framework.dll b/Samples/Lib/nunit.framework.dll deleted file mode 100644 index 2a0a0aa32..000000000 Binary files a/Samples/Lib/nunit.framework.dll and /dev/null differ diff --git a/Samples/ProductsMvcSample/ProductsMvcSample.sln b/Samples/ProductsMvcSample/ProductsMvcSample.sln deleted file mode 100644 index dbed5c301..000000000 --- a/Samples/ProductsMvcSample/ProductsMvcSample.sln +++ /dev/null @@ -1,34 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{6F1F9F8E-B88A-426E-9408-CB39D2052BFA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{6CA54C7A-DAB8-42E4-8A20-C1329194FF36}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductsMvcSample", "Source\ProductsMvcSample\ProductsMvcSample.csproj", "{766F76DC-B97D-41FE-A6D8-F039EAB8533D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductsMvcSample.Tests", "UnitTests\ProductsMvcSample.Tests\ProductsMvcSample.Tests.csproj", "{0BB61A7C-2791-45EC-A7A5-E2F525CAFA72}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {766F76DC-B97D-41FE-A6D8-F039EAB8533D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {766F76DC-B97D-41FE-A6D8-F039EAB8533D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {766F76DC-B97D-41FE-A6D8-F039EAB8533D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {766F76DC-B97D-41FE-A6D8-F039EAB8533D}.Release|Any CPU.Build.0 = Release|Any CPU - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {766F76DC-B97D-41FE-A6D8-F039EAB8533D} = {6F1F9F8E-B88A-426E-9408-CB39D2052BFA} - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72} = {6CA54C7A-DAB8-42E4-8A20-C1329194FF36} - EndGlobalSection -EndGlobal diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/HomeController.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/HomeController.cs deleted file mode 100644 index 88025b6ee..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/HomeController.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Web.Mvc; - -namespace ProductsMvcSample.Controllers -{ - public class HomeController : Controller - { - public ViewResult Index() - { - return View("Welcome"); - } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/ProductsController.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/ProductsController.cs deleted file mode 100644 index 1e2c0d56c..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Controllers/ProductsController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Web.Mvc; -using ProductsMvcSample.Models; -using ProductsMvcSample.Services; - -namespace ProductsMvcSample.Controllers -{ - public class ProductsController : Controller - { - IProductsCatalogService catalogService; - - public ProductsController() - : this(new ProductsCatalogService()) - { - - } - - public ProductsController(IProductsCatalogService catalogService) - { - this.catalogService = catalogService; - } - - public ActionResult Index() - { - return View(); - } - - public ActionResult Category(int id) - { - var model = new ProductsListViewData(); - model.CategoryId = id; - model.CategoryName = catalogService.GetCategoryName(id); - model.Products.AddRange(catalogService.GetProducts(id) ?? new Product[0]); - return View("ProductsList", model); - } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx deleted file mode 100644 index 65b715e11..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ProductsMvcSample.Default" %> - -<%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%> diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx.cs deleted file mode 100644 index 8c90403af..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Default.aspx.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace ProductsMvcSample -{ - public partial class Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Response.Redirect("~/Home"); - } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax deleted file mode 100644 index 9ed5fbca5..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="ProductsMvcSample.Global" Language="C#" %> diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax.cs deleted file mode 100644 index 3c9744975..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Global.asax.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Web.Mvc; -using System.Web.Routing; - -namespace ProductsMvcSample -{ - public class Global : System.Web.HttpApplication - { - - protected void Application_Start(object sender, EventArgs e) - { - // Note: Change Url= to Url="[controller].mvc/[action]/[id]" to enable - // automatic support on IIS6 - RegisterRoutes(RouteTable.Routes); - } - - public static void RegisterRoutes(RouteCollection routes) - { - routes.MapRoute( - "Default", // Route name - "{controller}/{action}/{id}", // URL with parameters - new { controller = "Home", action = "Index", id = "" }, // Parameter defaults - new { controller = @"[^\.]*" } // Parameter constraints - ); - - routes.MapRoute( - "Root", // Route name - "Default.aspx", // URL with parameters - new { controller = "Home", action = "Index", id = "" } // Parameter defaults - ); - } - } -} \ No newline at end of file diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/Product.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/Product.cs deleted file mode 100644 index cb0ccc8a7..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/Product.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace ProductsMvcSample.Models -{ - public class Product - { - public int Id { get; set; } - public string Name { get; set; } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/ProductsListViewData.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/ProductsListViewData.cs deleted file mode 100644 index d99369e1e..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Models/ProductsListViewData.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; - -namespace ProductsMvcSample.Models -{ - public class ProductsListViewData - { - public ProductsListViewData () - { - Products = new List(); - } - - public int CategoryId { get; set; } - public string CategoryName { get; set; } - public List Products { get; private set; } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/ProductsMvcSample.csproj b/Samples/ProductsMvcSample/Source/ProductsMvcSample/ProductsMvcSample.csproj deleted file mode 100644 index 4e435deba..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/ProductsMvcSample.csproj +++ /dev/null @@ -1,144 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {766F76DC-B97D-41FE-A6D8-F039EAB8533D} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - ProductsMvcSample - ProductsMvcSample - v3.5 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - False - ..\..\..\Lib\Microsoft.Web.Mvc.dll - - - False - ..\..\..\Lib\Moq.dll - - - - - 3.5 - - - False - ..\..\..\Lib\System.Web.Abstractions.dll - 3.5 - - - False - - - False - ..\..\..\Lib\System.Web.Mvc.dll - - - False - ..\..\..\Lib\System.Web.Routing.dll - 3.5 - - - 3.5 - - - - - - - - - - - - - - - - - - Default.aspx - ASPXCodeBehind - - - Global.asax - - - - - - - - Welcome.aspx - ASPXCodeBehind - - - ProductsList.aspx - ASPXCodeBehind - - - Site.Master - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - False - True - 64701 - / - - - False - False - - - False - - - - - diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Properties/AssemblyInfo.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Properties/AssemblyInfo.cs deleted file mode 100644 index ab77be42f..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ProductsMvcSample")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("MSIT")] -[assembly: AssemblyProduct("ProductsMvcSample")] -[assembly: AssemblyCopyright("Copyright © MSIT 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/IProductsCatalogService.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/IProductsCatalogService.cs deleted file mode 100644 index 798a130e0..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/IProductsCatalogService.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using ProductsMvcSample.Models; - -namespace ProductsMvcSample.Services -{ - public interface IProductsCatalogService - { - string GetCategoryName(int categoryId); - IEnumerable GetProducts(int categoryId); - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/ProductsCatalogService.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/ProductsCatalogService.cs deleted file mode 100644 index e622f3734..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Services/ProductsCatalogService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; -using ProductsMvcSample.Models; - -namespace ProductsMvcSample.Services -{ - public class ProductsCatalogService : IProductsCatalogService - { - public string GetCategoryName(int categoryId) - { - if (categoryId == 1) - return "Beverage"; - if (categoryId == 2) - return "Condiments"; - return null; - } - - public IEnumerable GetProducts(int categoryId) - { - if (categoryId == 1) - { - yield return new Product { Id = 1, Name = "Merlot" }; - yield return new Product { Id = 2, Name = "Spirits" }; - yield return new Product { Id = 3, Name = "Beer" }; - yield return new Product { Id = 4, Name = "Cabernet" }; - yield return new Product { Id = 5, Name = "Chardonnay" }; - } - if (categoryId == 2) - { - yield return new Product { Id = 10, Name = "Aniseed Syrup" }; - yield return new Product { Id = 11, Name = "Chef Anton's Cajun Seasoning" }; - yield return new Product { Id = 12, Name = "Chef Anton's Gumbo Mix" }; - yield return new Product { Id = 13, Name = "Gula Malacca" }; - yield return new Product { Id = 14, Name = "Vegie-spread" }; - } - yield break; - } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx deleted file mode 100644 index d7ca3d408..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx +++ /dev/null @@ -1,11 +0,0 @@ -<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Welcome.aspx.cs" Inherits="ProductsMvcSample.Views.Home.Welcome" Title="Untitled Page" %> -<%@ Import Namespace="ProductsMvcSample.Controllers" %> - - - - -
    -
  • <%= Html.ActionLink(c => c.Category(1), "View Category 1") %>
  • -
  • <%= Html.ActionLink(c => c.Category(2), "View Category 2") %>
  • -
-
diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx.cs deleted file mode 100644 index 7c2cd3419..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Home/Welcome.aspx.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Web.Mvc; - -namespace ProductsMvcSample.Views.Home -{ - public partial class Welcome : ViewPage - { - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx deleted file mode 100644 index ead0519fc..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx +++ /dev/null @@ -1,15 +0,0 @@ -<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="ProductsList.aspx.cs" Inherits="ProductsMvcSample.Views.Products.ProductsList" Title="Untitled Page" %> - - - - -

<%= ViewData.Model.CategoryName %>

- -
    -<% foreach (var product in ViewData.Model.Products) - { %> -
  • <%= product.Name %>
  • -<% } %> -
- -
diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx.cs deleted file mode 100644 index c685655e9..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Products/ProductsList.aspx.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Web.Mvc; -using ProductsMvcSample.Models; - -namespace ProductsMvcSample.Views.Products -{ - public partial class ProductsList : ViewPage - { - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - Title = "Products of " + ViewData.Model.CategoryName; - } - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master deleted file mode 100644 index c85635c85..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master +++ /dev/null @@ -1,19 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ProductsMvcSample.Views.Shared.Site" %> - - - - - - Untitled Page - - - - -
Products Catalog Sample (Tested by MoQ).
-
- - - -
- - diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master.cs b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master.cs deleted file mode 100644 index fb23e9f60..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Views/Shared/Site.Master.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Web.Mvc; - -namespace ProductsMvcSample.Views.Shared -{ - public partial class Site : ViewMasterPage - { - } -} diff --git a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Web.config b/Samples/ProductsMvcSample/Source/ProductsMvcSample/Web.config deleted file mode 100644 index 24c50ff1d..000000000 --- a/Samples/ProductsMvcSample/Source/ProductsMvcSample/Web.config +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Controllers/ProductsControllerFixture.cs b/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Controllers/ProductsControllerFixture.cs deleted file mode 100644 index aa85be1d3..000000000 --- a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Controllers/ProductsControllerFixture.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using System.Web.Mvc; -using Moq; -using ProductsMvcSample.Models; -using ProductsMvcSample.Controllers; -using ProductsMvcSample.Services; - -namespace ProductsMvcSample.Tests.Controllers -{ - [TestFixture] - public class ProductsControllerFixture - { - [Test] - public void CategoryRendersProductsListWithProductsListViewData() - { - // Arrange mocks - var catalogService = new Mock(); - - // Target object - var controller = new ProductsController(catalogService.Object); - - // Act - var result = controller.Category(2); - - // Assert - Assert.IsNotNull(result); - Assert.IsTrue(result is ViewResult); - var viewResult = (ViewResult)result; - Assert.IsNotNull(viewResult.ViewData.Model); - Assert.That(viewResult.ViewData.Model is ProductsListViewData); - } - - [Test] - public void CategoryRendersRendersViewDataWithCategoryInfo() - { - // Arrange mocks - var catalogService = new Mock(); - catalogService - .Setup(c => c.GetCategoryName(2)) - .Returns("FooCategory"); - - // Target object - var controller = new ProductsController(catalogService.Object); - - // Act - var result = controller.Category(2); - - // Assert - // We don't repeat the assertions from the previous test here - var viewData = ((ViewResult)result).ViewData.Model as ProductsListViewData; - Assert.IsNotNull(viewData); - Assert.AreEqual(2, viewData.CategoryId); - Assert.AreEqual("FooCategory", viewData.CategoryName); - } - - [Test] - public void CategoryRendersRendersViewDataWithProdcutsListing() - { - // Arrange mocks - var catalogService = new Mock(); - catalogService - .Setup(c => c.GetCategoryName(2)) - .Returns("FooCategory"); - catalogService.Setup(c => c - .GetProducts(2)) - .Returns(new List - { - new Product { Id = 4 , Name = "Foo" }, - new Product { Id = 7 , Name = "Bar" } - }); - - // Target object - var controller = new ProductsController(catalogService.Object); - - // Act - var result = controller.Category(2); - - // Assert - var viewData = ((ViewResult)result).ViewData.Model as ProductsListViewData; - Assert.IsNotNull(viewData); - Assert.AreEqual(2, viewData.Products.Count); - Assert.AreEqual(4, viewData.Products[0].Id); - Assert.AreEqual("Bar", viewData.Products[1].Name); - } - } -} diff --git a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/MvcTestHelper.cs b/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/MvcTestHelper.cs deleted file mode 100644 index ac6e25478..000000000 --- a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/MvcTestHelper.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Web.Mvc; -using System.Web; -using Moq; -using System.Linq.Expressions; -using NUnit.Framework; -using System.ComponentModel; -using System.Web.Routing; - -namespace ProductsMvcSample.Tests -{ - public static class MvcTestHelper - { - public static void VerifyCallsTo(this RouteData route, Expression> action) - where T : IController - { - Assert.IsNotNull(route); - - Assert.IsTrue(route.Values.ContainsKey("controller"), "Controller's name doesn't exists."); - Assert.AreEqual(typeof(T).Name, route.Values["controller"].ToString() + "Controller", "Controller's name."); - - var methodCall = action.Body as MethodCallExpression; - if (methodCall == null) - throw new NotSupportedException("Action body must be a MethodCallExpression."); - - Assert.IsTrue(route.Values.ContainsKey("action"), "Action's name doesn't exists."); - Assert.AreEqual(methodCall.Method.Name, route.Values["action"], "Action's name."); - - foreach (var parameter in methodCall.Method.GetParameters()) - { - Assert.IsTrue(route.Values.ContainsKey(parameter.Name), String.Format("Argument for '{0}' doesn't exists.", parameter.Name)); - - object expectedValue; - var argumentExpr = methodCall.Arguments[parameter.Position] as ConstantExpression; - if (argumentExpr != null) - expectedValue = argumentExpr.Value; - else - throw new NotSupportedException("Arguments must be ConstantExpression."); - object actualValue = TypeDescriptor.GetConverter(expectedValue.GetType()).ConvertFromString(route.Values[parameter.Name].ToString()); - Assert.AreEqual(expectedValue, actualValue, String.Format("Argument for '{0}'.", parameter.Name)); - } - } - } -} diff --git a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/ProductsMvcSample.Tests.csproj b/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/ProductsMvcSample.Tests.csproj deleted file mode 100644 index dbec457c6..000000000 --- a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/ProductsMvcSample.Tests.csproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0BB61A7C-2791-45EC-A7A5-E2F525CAFA72} - Library - Properties - ProductsMvcSample.Tests - ProductsMvcSample.Tests - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\Lib\Moq.dll - - - False - ..\..\..\Lib\nunit.framework.dll - - - - 3.5 - - - - False - ..\..\..\Lib\System.Web.Abstractions.dll - 3.5 - - - False - - - False - ..\..\..\Lib\System.Web.Mvc.dll - - - False - ..\..\..\Lib\System.Web.Routing.dll - 3.5 - - - 3.5 - - - - - - - - Code - - - - Code - - - - - {766F76DC-B97D-41FE-A6D8-F039EAB8533D} - ProductsMvcSample - - - - - \ No newline at end of file diff --git a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Properties/AssemblyInfo.cs b/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 89e71474d..000000000 --- a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ProductsMvcSample.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ProductsMvcSample.Tests")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("de0092f2-f2f0-49b9-bf7e-cfbcb331cccc")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Routes/ProductsRoutesFixture.cs b/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Routes/ProductsRoutesFixture.cs deleted file mode 100644 index 834ca39af..000000000 --- a/Samples/ProductsMvcSample/UnitTests/ProductsMvcSample.Tests/Routes/ProductsRoutesFixture.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using System.Web.Mvc; -using ProductsMvcSample.Controllers; -using System.Web.Routing; -using Moq; -using System.Web; - -namespace ProductsMvcSample.Tests.Routes -{ - [TestFixture] - public class ProductsRoutesFixture - { - [Test] - public void ShouldAccept_Products_Category_CategoryId() - { - // Arrange - var routes = new RouteCollection(); - Global.RegisterRoutes(routes); - var context = new Mock { DefaultValue = DefaultValue.Mock }; - context - .Setup(c => c.Request.AppRelativeCurrentExecutionFilePath) - .Returns("~/Products/Category/2"); - - // Act - var routeData = routes.GetRouteData(context.Object); - - // Assert - Assert.AreEqual("Products", routeData.Values["controller"], "Default controller is HomeController"); - Assert.AreEqual("Category", routeData.Values["action"], "Default action is Index"); - Assert.AreEqual("2", routeData.Values["id"], "Default Id is empty string"); - - routeData.VerifyCallsTo(c => c.Category(2)); - } - } -} diff --git a/Samples/StoreSample/Source/Models/Category.cs b/Samples/StoreSample/Source/Models/Category.cs deleted file mode 100644 index 0e7f7637c..000000000 --- a/Samples/StoreSample/Source/Models/Category.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Store -{ - public class Category - { - public int Id { get; set; } - public string Name { get; set; } - } -} diff --git a/Samples/StoreSample/Source/Models/Order.cs b/Samples/StoreSample/Source/Models/Order.cs deleted file mode 100644 index ea3877b17..000000000 --- a/Samples/StoreSample/Source/Models/Order.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Store -{ - public class Order - { - public Product Product { get; set; } - public int Quantity { get; set; } - public bool Filled { get; set; } - } -} diff --git a/Samples/StoreSample/Source/Models/Product.cs b/Samples/StoreSample/Source/Models/Product.cs deleted file mode 100644 index 36e5a42ef..000000000 --- a/Samples/StoreSample/Source/Models/Product.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Store -{ - public class Product - { - public int Id { get; set; } - public string Name { get; set; } - } -} diff --git a/Samples/StoreSample/Source/Presenters/ProductsPresenter.cs b/Samples/StoreSample/Source/Presenters/ProductsPresenter.cs deleted file mode 100644 index 93980fe65..000000000 --- a/Samples/StoreSample/Source/Presenters/ProductsPresenter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -namespace Store -{ - public class ProductsPresenter - { - ICatalogService catalog; - IProductsView view; - - public ProductsPresenter(ICatalogService catalog, IProductsView view) - { - this.catalog = catalog; - this.view = view; - view.SetCategories(catalog.GetCategories()); - view.CategorySelected += (sender, args) => SelectCategory(args.Category); - } - - void SelectCategory(Category category) - { - view.SetProducts(catalog.GetProducts(category.Id)); - } - - public void PlaceOrder(Order order) - { - if (catalog.HasInventory(order.Product.Id, order.Quantity)) - { - try - { - catalog.Remove(order.Product.Id, order.Quantity); - order.Filled = true; - } - catch (InvalidOperationException) - { - // LOG? - } - } - } - } -} diff --git a/Samples/StoreSample/Source/Properties/AssemblyInfo.cs b/Samples/StoreSample/Source/Properties/AssemblyInfo.cs deleted file mode 100644 index f8b7f0031..000000000 --- a/Samples/StoreSample/Source/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Source")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Source")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d42053e4-3f65-401f-ae9f-31d242d3561f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/StoreSample/Source/Services/CatalogService.cs b/Samples/StoreSample/Source/Services/CatalogService.cs deleted file mode 100644 index 44e7c9750..000000000 --- a/Samples/StoreSample/Source/Services/CatalogService.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace Store -{ - public class CatalogService - { - } -} diff --git a/Samples/StoreSample/Source/Services/ICatalogService.cs b/Samples/StoreSample/Source/Services/ICatalogService.cs deleted file mode 100644 index d8ae34a7c..000000000 --- a/Samples/StoreSample/Source/Services/ICatalogService.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Store -{ - public interface ICatalogService - { - IEnumerable GetCategories(); - IEnumerable GetProducts(int categoryId); - bool HasInventory(int productId, int quantity); - void Remove(int productId, int quantity); - } -} diff --git a/Samples/StoreSample/Source/Store.csproj b/Samples/StoreSample/Source/Store.csproj deleted file mode 100644 index f7bc6f375..000000000 --- a/Samples/StoreSample/Source/Store.csproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BDF061BD-AD85-4BE6-9661-C24504896633} - Library - Properties - Store - Store - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - - - - - - - - - - - - - - diff --git a/Samples/StoreSample/Source/Views/CategoryEventArgs.cs b/Samples/StoreSample/Source/Views/CategoryEventArgs.cs deleted file mode 100644 index e57ca22f4..000000000 --- a/Samples/StoreSample/Source/Views/CategoryEventArgs.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Store -{ - public class CategoryEventArgs : EventArgs - { - public CategoryEventArgs(Category category) - { - this.Category = category; - } - - public Category Category { get; private set; } - } -} diff --git a/Samples/StoreSample/Source/Views/IProductsView.cs b/Samples/StoreSample/Source/Views/IProductsView.cs deleted file mode 100644 index 1c464ab5b..000000000 --- a/Samples/StoreSample/Source/Views/IProductsView.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Store -{ - public interface IProductsView - { - event EventHandler CategorySelected; - void SetCategories(IEnumerable categories); - void SetProducts(IEnumerable products); - } -} diff --git a/Samples/StoreSample/StoreSample.sln b/Samples/StoreSample/StoreSample.sln deleted file mode 100644 index 021f439e9..000000000 --- a/Samples/StoreSample/StoreSample.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Store", "Source\Store.csproj", "{BDF061BD-AD85-4BE6-9661-C24504896633}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Store.Tests", "UnitTests\Store.Tests.csproj", "{ACA76E67-0611-4415-927D-64FFB9C462A5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EAB21A99-0B6F-431E-B2D2-2D98FA1ECDDD}" - ProjectSection(SolutionItems) = preProject - Stories.txt = Stories.txt - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BDF061BD-AD85-4BE6-9661-C24504896633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDF061BD-AD85-4BE6-9661-C24504896633}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDF061BD-AD85-4BE6-9661-C24504896633}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDF061BD-AD85-4BE6-9661-C24504896633}.Release|Any CPU.Build.0 = Release|Any CPU - {ACA76E67-0611-4415-927D-64FFB9C462A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ACA76E67-0611-4415-927D-64FFB9C462A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ACA76E67-0611-4415-927D-64FFB9C462A5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ACA76E67-0611-4415-927D-64FFB9C462A5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/StoreSample/Stories.txt b/Samples/StoreSample/Stories.txt deleted file mode 100644 index 1ff2b4359..000000000 --- a/Samples/StoreSample/Stories.txt +++ /dev/null @@ -1,10 +0,0 @@ -Products - -1 - User sees a list of all available categories -2 - Upon selection of a category, a list of corresponding products is shown -3 - Upon selection of a product, the user can place an order by specifying the quantity. - a) Order will only be filled if there's enough inventory in stock. - b) If there's enough stock, the corresponding quantity of the product - will be removed from the stock. - c) If stock throws while removing the products, no error is raised and the - order remains unfilled so that the user can retry the operation. \ No newline at end of file diff --git a/Samples/StoreSample/UnitTests/ProductsPresenterFixturecs.cs b/Samples/StoreSample/UnitTests/ProductsPresenterFixturecs.cs deleted file mode 100644 index 54deff40b..000000000 --- a/Samples/StoreSample/UnitTests/ProductsPresenterFixturecs.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System.Collections.Generic; -using Moq; -using NUnit.Framework; -using System; - -namespace Store.Tests -{ - [TestFixture] - public class ProductsPresenterFixturecs - { - [Test] - public void ShouldSetViewCategories() - { - // Arrange - var catalog = new Mock(); - var view = new Mock(); - - // Act - var presenter = new ProductsPresenter(catalog.Object, view.Object); - - // Assert - view.Verify(v => v.SetCategories(It.IsAny>())); - } - - - [Test] - public void ShouldCategorySelectionSetProducts() - { - // Arrange - var catalog = new Mock(); - var view = new Mock(); - var presenter = new ProductsPresenter(catalog.Object, view.Object); - - // Act - view.Raise( - v => v.CategorySelected += null, - new CategoryEventArgs(new Category { Id = 1 })); - - // Assert - view.Verify(v => v.SetProducts(It.IsAny>())); - } - - [Test] - public void ShouldPlaceOrderIfEnoughInventory() - { - // Arrange - var catalog = new Mock(); - var view = new Mock(); - var presenter = new ProductsPresenter(catalog.Object, view.Object); - var order = new Order - { - Product = new Product { Id = 1 }, - Quantity = 5 - }; - - catalog - .Setup(c => c.HasInventory(1, 5)) - .Returns(true); - - // Act - presenter.PlaceOrder(order); - - // Assert - Assert.IsTrue(order.Filled); - catalog.Verify(c => c.HasInventory(1, 5)); - } - - [Test] - public void ShouldNotPlaceOrderIfNotEnoughInventory() - { - // Arrange - var catalog = new Mock(); - var view = new Mock(); - var presenter = new ProductsPresenter(catalog.Object, view.Object); - var order = new Order - { - Product = new Product { Id = 1 }, - Quantity = 5 - }; - - catalog - .Setup(c => c.HasInventory(1, 5)) - .Returns(false); - - // Act - presenter.PlaceOrder(order); - - // Assert - Assert.IsFalse(order.Filled); - catalog.Verify(c => c.HasInventory(1, 5)); - } - - [Test] - public void ShouldNotPlaceOrderIfFailsToRemove() - { - // Arrange - var catalog = new Mock(); - var view = new Mock(); - var presenter = new ProductsPresenter(catalog.Object, view.Object); - var order = new Order - { - Product = new Product { Id = 1 }, - Quantity = 5 - }; - - catalog - .Setup(c => c.HasInventory(1, 5)) - .Returns(true); - catalog - .Setup(c => c.Remove(1, 5)) - .Throws(); - - // Act - presenter.PlaceOrder(order); - - // Assert - Assert.IsFalse(order.Filled); - catalog.Verify(c => c.HasInventory(1, 5)); - catalog.Verify(c => c.Remove(1, 5)); - } - } -} diff --git a/Samples/StoreSample/UnitTests/Properties/AssemblyInfo.cs b/Samples/StoreSample/UnitTests/Properties/AssemblyInfo.cs deleted file mode 100644 index b3fedb0df..000000000 --- a/Samples/StoreSample/UnitTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("UnitTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("UnitTests")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ad32ee97-abac-45b0-94b0-6a987e8e22a6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/StoreSample/UnitTests/Store.Tests.csproj b/Samples/StoreSample/UnitTests/Store.Tests.csproj deleted file mode 100644 index f9c39109b..000000000 --- a/Samples/StoreSample/UnitTests/Store.Tests.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {ACA76E67-0611-4415-927D-64FFB9C462A5} - Library - Properties - Store.Tests - Store.Tests - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\Lib\Moq.dll - - - False - ..\..\Lib\nunit.framework.dll - - - - 3.5 - - - - - - - - - {BDF061BD-AD85-4BE6-9661-C24504896633} - Store - - - - - \ No newline at end of file diff --git a/build.proj b/build.proj index 7b833fa15..4e13cc499 100644 --- a/build.proj +++ b/build.proj @@ -15,7 +15,7 @@ - + @@ -42,12 +42,12 @@ so create it if it doesn't exist yet. --> - - @@ -74,8 +74,8 @@ diff --git a/Source/AsInterface.cs b/src/Moq/AsInterface.cs similarity index 100% rename from Source/AsInterface.cs rename to src/Moq/AsInterface.cs diff --git a/Source/Capture.cs b/src/Moq/Capture.cs similarity index 100% rename from Source/Capture.cs rename to src/Moq/Capture.cs diff --git a/Source/CaptureMatch.cs b/src/Moq/CaptureMatch.cs similarity index 100% rename from Source/CaptureMatch.cs rename to src/Moq/CaptureMatch.cs diff --git a/Source/Condition.cs b/src/Moq/Condition.cs similarity index 100% rename from Source/Condition.cs rename to src/Moq/Condition.cs diff --git a/Source/ConditionalContext.cs b/src/Moq/ConditionalContext.cs similarity index 100% rename from Source/ConditionalContext.cs rename to src/Moq/ConditionalContext.cs diff --git a/Source/DefaultValue.cs b/src/Moq/DefaultValue.cs similarity index 100% rename from Source/DefaultValue.cs rename to src/Moq/DefaultValue.cs diff --git a/Source/DefaultValueProvider.cs b/src/Moq/DefaultValueProvider.cs similarity index 100% rename from Source/DefaultValueProvider.cs rename to src/Moq/DefaultValueProvider.cs diff --git a/Source/EmptyDefaultValueProvider.cs b/src/Moq/EmptyDefaultValueProvider.cs similarity index 100% rename from Source/EmptyDefaultValueProvider.cs rename to src/Moq/EmptyDefaultValueProvider.cs diff --git a/Source/Evaluator.cs b/src/Moq/Evaluator.cs similarity index 100% rename from Source/Evaluator.cs rename to src/Moq/Evaluator.cs diff --git a/Source/EventHandlerCollection.cs b/src/Moq/EventHandlerCollection.cs similarity index 100% rename from Source/EventHandlerCollection.cs rename to src/Moq/EventHandlerCollection.cs diff --git a/Source/ExpressionComparer.cs b/src/Moq/ExpressionComparer.cs similarity index 100% rename from Source/ExpressionComparer.cs rename to src/Moq/ExpressionComparer.cs diff --git a/Source/ExpressionExtensions.cs b/src/Moq/ExpressionExtensions.cs similarity index 100% rename from Source/ExpressionExtensions.cs rename to src/Moq/ExpressionExtensions.cs diff --git a/Source/ExpressionStringBuilder.cs b/src/Moq/ExpressionStringBuilder.cs similarity index 100% rename from Source/ExpressionStringBuilder.cs rename to src/Moq/ExpressionStringBuilder.cs diff --git a/Source/Extensions.cs b/src/Moq/Extensions.cs similarity index 100% rename from Source/Extensions.cs rename to src/Moq/Extensions.cs diff --git a/Source/FluentMockContext.cs b/src/Moq/FluentMockContext.cs similarity index 100% rename from Source/FluentMockContext.cs rename to src/Moq/FluentMockContext.cs diff --git a/Source/Guard.cs b/src/Moq/Guard.cs similarity index 100% rename from Source/Guard.cs rename to src/Moq/Guard.cs diff --git a/Source/IInvocation.cs b/src/Moq/IInvocation.cs similarity index 100% rename from Source/IInvocation.cs rename to src/Moq/IInvocation.cs diff --git a/Source/IInvocationList.cs b/src/Moq/IInvocationList.cs similarity index 100% rename from Source/IInvocationList.cs rename to src/Moq/IInvocationList.cs diff --git a/Source/IMatcher.cs b/src/Moq/IMatcher.cs similarity index 100% rename from Source/IMatcher.cs rename to src/Moq/IMatcher.cs diff --git a/Source/IMock.cs b/src/Moq/IMock.cs similarity index 100% rename from Source/IMock.cs rename to src/Moq/IMock.cs diff --git a/Source/IMocked.cs b/src/Moq/IMocked.cs similarity index 100% rename from Source/IMocked.cs rename to src/Moq/IMocked.cs diff --git a/Source/Includes/GenericTypeParameters.tt b/src/Moq/Includes/GenericTypeParameters.tt similarity index 100% rename from Source/Includes/GenericTypeParameters.tt rename to src/Moq/Includes/GenericTypeParameters.tt diff --git a/Source/Interception/IInterceptor.cs b/src/Moq/Interception/IInterceptor.cs similarity index 100% rename from Source/Interception/IInterceptor.cs rename to src/Moq/Interception/IInterceptor.cs diff --git a/Source/Interception/InterceptionAspect.cs b/src/Moq/Interception/InterceptionAspect.cs similarity index 100% rename from Source/Interception/InterceptionAspect.cs rename to src/Moq/Interception/InterceptionAspect.cs diff --git a/Source/Interception/InterceptionAspects.cs b/src/Moq/Interception/InterceptionAspects.cs similarity index 100% rename from Source/Interception/InterceptionAspects.cs rename to src/Moq/Interception/InterceptionAspects.cs diff --git a/Source/Interception/Mock.cs b/src/Moq/Interception/Mock.cs similarity index 100% rename from Source/Interception/Mock.cs rename to src/Moq/Interception/Mock.cs diff --git a/Source/Invocation.cs b/src/Moq/Invocation.cs similarity index 100% rename from Source/Invocation.cs rename to src/Moq/Invocation.cs diff --git a/Source/InvocationCollection.cs b/src/Moq/InvocationCollection.cs similarity index 100% rename from Source/InvocationCollection.cs rename to src/Moq/InvocationCollection.cs diff --git a/Source/It.cs b/src/Moq/It.cs similarity index 100% rename from Source/It.cs rename to src/Moq/It.cs diff --git a/Source/It.xdoc b/src/Moq/It.xdoc similarity index 100% rename from Source/It.xdoc rename to src/Moq/It.xdoc diff --git a/Source/Language/Flow/ICallbackResult.cs b/src/Moq/Language/Flow/ICallbackResult.cs similarity index 100% rename from Source/Language/Flow/ICallbackResult.cs rename to src/Moq/Language/Flow/ICallbackResult.cs diff --git a/Source/Language/Flow/IReturnsResult.cs b/src/Moq/Language/Flow/IReturnsResult.cs similarity index 100% rename from Source/Language/Flow/IReturnsResult.cs rename to src/Moq/Language/Flow/IReturnsResult.cs diff --git a/Source/Language/Flow/IReturnsThrows.cs b/src/Moq/Language/Flow/IReturnsThrows.cs similarity index 100% rename from Source/Language/Flow/IReturnsThrows.cs rename to src/Moq/Language/Flow/IReturnsThrows.cs diff --git a/Source/Language/Flow/ISetup.cs b/src/Moq/Language/Flow/ISetup.cs similarity index 100% rename from Source/Language/Flow/ISetup.cs rename to src/Moq/Language/Flow/ISetup.cs diff --git a/Source/Language/Flow/IThrowsResult.cs b/src/Moq/Language/Flow/IThrowsResult.cs similarity index 100% rename from Source/Language/Flow/IThrowsResult.cs rename to src/Moq/Language/Flow/IThrowsResult.cs diff --git a/Source/Language/Flow/SetupSequencePhrase.cs b/src/Moq/Language/Flow/SetupSequencePhrase.cs similarity index 100% rename from Source/Language/Flow/SetupSequencePhrase.cs rename to src/Moq/Language/Flow/SetupSequencePhrase.cs diff --git a/Source/Language/ICallback.Generated.cs b/src/Moq/Language/ICallback.Generated.cs similarity index 100% rename from Source/Language/ICallback.Generated.cs rename to src/Moq/Language/ICallback.Generated.cs diff --git a/Source/Language/ICallback.cs b/src/Moq/Language/ICallback.cs similarity index 100% rename from Source/Language/ICallback.cs rename to src/Moq/Language/ICallback.cs diff --git a/Source/Language/ICallback.tt b/src/Moq/Language/ICallback.tt similarity index 100% rename from Source/Language/ICallback.tt rename to src/Moq/Language/ICallback.tt diff --git a/Source/Language/ICallbackGetter.cs b/src/Moq/Language/ICallbackGetter.cs similarity index 100% rename from Source/Language/ICallbackGetter.cs rename to src/Moq/Language/ICallbackGetter.cs diff --git a/Source/Language/ICallbackSetter.cs b/src/Moq/Language/ICallbackSetter.cs similarity index 100% rename from Source/Language/ICallbackSetter.cs rename to src/Moq/Language/ICallbackSetter.cs diff --git a/Source/Language/IRaise.Generated.cs b/src/Moq/Language/IRaise.Generated.cs similarity index 100% rename from Source/Language/IRaise.Generated.cs rename to src/Moq/Language/IRaise.Generated.cs diff --git a/Source/Language/IRaise.cs b/src/Moq/Language/IRaise.cs similarity index 100% rename from Source/Language/IRaise.cs rename to src/Moq/Language/IRaise.cs diff --git a/Source/Language/IRaise.tt b/src/Moq/Language/IRaise.tt similarity index 100% rename from Source/Language/IRaise.tt rename to src/Moq/Language/IRaise.tt diff --git a/Source/Language/IReturns.Generated.cs b/src/Moq/Language/IReturns.Generated.cs similarity index 100% rename from Source/Language/IReturns.Generated.cs rename to src/Moq/Language/IReturns.Generated.cs diff --git a/Source/Language/IReturns.cs b/src/Moq/Language/IReturns.cs similarity index 100% rename from Source/Language/IReturns.cs rename to src/Moq/Language/IReturns.cs diff --git a/Source/Language/IReturns.tt b/src/Moq/Language/IReturns.tt similarity index 100% rename from Source/Language/IReturns.tt rename to src/Moq/Language/IReturns.tt diff --git a/Source/Language/IReturnsGetter.cs b/src/Moq/Language/IReturnsGetter.cs similarity index 100% rename from Source/Language/IReturnsGetter.cs rename to src/Moq/Language/IReturnsGetter.cs diff --git a/Source/Language/ISetupConditionResult.cs b/src/Moq/Language/ISetupConditionResult.cs similarity index 100% rename from Source/Language/ISetupConditionResult.cs rename to src/Moq/Language/ISetupConditionResult.cs diff --git a/Source/Language/ISetupSequentialAction.cs b/src/Moq/Language/ISetupSequentialAction.cs similarity index 100% rename from Source/Language/ISetupSequentialAction.cs rename to src/Moq/Language/ISetupSequentialAction.cs diff --git a/Source/Language/ISetupSequentialResult.cs b/src/Moq/Language/ISetupSequentialResult.cs similarity index 100% rename from Source/Language/ISetupSequentialResult.cs rename to src/Moq/Language/ISetupSequentialResult.cs diff --git a/Source/Language/IThrows.cs b/src/Moq/Language/IThrows.cs similarity index 100% rename from Source/Language/IThrows.cs rename to src/Moq/Language/IThrows.cs diff --git a/Source/Language/IVerifies.cs b/src/Moq/Language/IVerifies.cs similarity index 100% rename from Source/Language/IVerifies.cs rename to src/Moq/Language/IVerifies.cs diff --git a/Source/Linq/FluentMockVisitor.cs b/src/Moq/Linq/FluentMockVisitor.cs similarity index 100% rename from Source/Linq/FluentMockVisitor.cs rename to src/Moq/Linq/FluentMockVisitor.cs diff --git a/Source/Linq/Mock.cs b/src/Moq/Linq/Mock.cs similarity index 100% rename from Source/Linq/Mock.cs rename to src/Moq/Linq/Mock.cs diff --git a/Source/Linq/MockQuery.cs b/src/Moq/Linq/MockQuery.cs similarity index 100% rename from Source/Linq/MockQuery.cs rename to src/Moq/Linq/MockQuery.cs diff --git a/Source/Linq/MockRepository.cs b/src/Moq/Linq/MockRepository.cs similarity index 100% rename from Source/Linq/MockRepository.cs rename to src/Moq/Linq/MockRepository.cs diff --git a/Source/Linq/MockSetupsBuilder.cs b/src/Moq/Linq/MockSetupsBuilder.cs similarity index 100% rename from Source/Linq/MockSetupsBuilder.cs rename to src/Moq/Linq/MockSetupsBuilder.cs diff --git a/Source/Linq/Mocks.cs b/src/Moq/Linq/Mocks.cs similarity index 100% rename from Source/Linq/Mocks.cs rename to src/Moq/Linq/Mocks.cs diff --git a/Source/LookupOrFallbackDefaultValueProvider.cs b/src/Moq/LookupOrFallbackDefaultValueProvider.cs similarity index 100% rename from Source/LookupOrFallbackDefaultValueProvider.cs rename to src/Moq/LookupOrFallbackDefaultValueProvider.cs diff --git a/Source/Match.cs b/src/Moq/Match.cs similarity index 100% rename from Source/Match.cs rename to src/Moq/Match.cs diff --git a/Source/Match.xdoc b/src/Moq/Match.xdoc similarity index 100% rename from Source/Match.xdoc rename to src/Moq/Match.xdoc diff --git a/Source/MatchExpression.cs b/src/Moq/MatchExpression.cs similarity index 100% rename from Source/MatchExpression.cs rename to src/Moq/MatchExpression.cs diff --git a/Source/MatcherFactory.cs b/src/Moq/MatcherFactory.cs similarity index 100% rename from Source/MatcherFactory.cs rename to src/Moq/MatcherFactory.cs diff --git a/Source/Matchers/AnyMatcher.cs b/src/Moq/Matchers/AnyMatcher.cs similarity index 100% rename from Source/Matchers/AnyMatcher.cs rename to src/Moq/Matchers/AnyMatcher.cs diff --git a/Source/Matchers/ConstantMatcher.cs b/src/Moq/Matchers/ConstantMatcher.cs similarity index 100% rename from Source/Matchers/ConstantMatcher.cs rename to src/Moq/Matchers/ConstantMatcher.cs diff --git a/Source/Matchers/ExpressionMatcher.cs b/src/Moq/Matchers/ExpressionMatcher.cs similarity index 100% rename from Source/Matchers/ExpressionMatcher.cs rename to src/Moq/Matchers/ExpressionMatcher.cs diff --git a/Source/Matchers/LazyEvalMatcher.cs b/src/Moq/Matchers/LazyEvalMatcher.cs similarity index 100% rename from Source/Matchers/LazyEvalMatcher.cs rename to src/Moq/Matchers/LazyEvalMatcher.cs diff --git a/Source/Matchers/MatcherAttributeMatcher.cs b/src/Moq/Matchers/MatcherAttributeMatcher.cs similarity index 100% rename from Source/Matchers/MatcherAttributeMatcher.cs rename to src/Moq/Matchers/MatcherAttributeMatcher.cs diff --git a/Source/Matchers/ParamArrayMatcher.cs b/src/Moq/Matchers/ParamArrayMatcher.cs similarity index 100% rename from Source/Matchers/ParamArrayMatcher.cs rename to src/Moq/Matchers/ParamArrayMatcher.cs diff --git a/Source/Matchers/RefMatcher.cs b/src/Moq/Matchers/RefMatcher.cs similarity index 100% rename from Source/Matchers/RefMatcher.cs rename to src/Moq/Matchers/RefMatcher.cs diff --git a/Source/MethodCall.Generated.cs b/src/Moq/MethodCall.Generated.cs similarity index 100% rename from Source/MethodCall.Generated.cs rename to src/Moq/MethodCall.Generated.cs diff --git a/Source/MethodCall.cs b/src/Moq/MethodCall.cs similarity index 100% rename from Source/MethodCall.cs rename to src/Moq/MethodCall.cs diff --git a/Source/MethodCall.tt b/src/Moq/MethodCall.tt similarity index 100% rename from Source/MethodCall.tt rename to src/Moq/MethodCall.tt diff --git a/Source/MethodCallReturn.Generated.cs b/src/Moq/MethodCallReturn.Generated.cs similarity index 100% rename from Source/MethodCallReturn.Generated.cs rename to src/Moq/MethodCallReturn.Generated.cs diff --git a/Source/MethodCallReturn.cs b/src/Moq/MethodCallReturn.cs similarity index 100% rename from Source/MethodCallReturn.cs rename to src/Moq/MethodCallReturn.cs diff --git a/Source/MethodCallReturn.tt b/src/Moq/MethodCallReturn.tt similarity index 100% rename from Source/MethodCallReturn.tt rename to src/Moq/MethodCallReturn.tt diff --git a/Source/Mock.Generic.cs b/src/Moq/Mock.Generic.cs similarity index 100% rename from Source/Mock.Generic.cs rename to src/Moq/Mock.Generic.cs diff --git a/Source/Mock.Generic.xdoc b/src/Moq/Mock.Generic.xdoc similarity index 100% rename from Source/Mock.Generic.xdoc rename to src/Moq/Mock.Generic.xdoc diff --git a/Source/Mock.cs b/src/Moq/Mock.cs similarity index 100% rename from Source/Mock.cs rename to src/Moq/Mock.cs diff --git a/Source/Mock.xdoc b/src/Moq/Mock.xdoc similarity index 100% rename from Source/Mock.xdoc rename to src/Moq/Mock.xdoc diff --git a/Source/MockBehavior.cs b/src/Moq/MockBehavior.cs similarity index 100% rename from Source/MockBehavior.cs rename to src/Moq/MockBehavior.cs diff --git a/Source/MockDefaultValueProvider.cs b/src/Moq/MockDefaultValueProvider.cs similarity index 100% rename from Source/MockDefaultValueProvider.cs rename to src/Moq/MockDefaultValueProvider.cs diff --git a/Source/MockException.cs b/src/Moq/MockException.cs similarity index 100% rename from Source/MockException.cs rename to src/Moq/MockException.cs diff --git a/Source/MockExceptionReason.cs b/src/Moq/MockExceptionReason.cs similarity index 100% rename from Source/MockExceptionReason.cs rename to src/Moq/MockExceptionReason.cs diff --git a/Source/MockExtensions.cs b/src/Moq/MockExtensions.cs similarity index 100% rename from Source/MockExtensions.cs rename to src/Moq/MockExtensions.cs diff --git a/Source/MockRepository.cs b/src/Moq/MockRepository.cs similarity index 100% rename from Source/MockRepository.cs rename to src/Moq/MockRepository.cs diff --git a/Source/MockSequence.cs b/src/Moq/MockSequence.cs similarity index 100% rename from Source/MockSequence.cs rename to src/Moq/MockSequence.cs diff --git a/Source/MockWithWrappedMockObject.cs b/src/Moq/MockWithWrappedMockObject.cs similarity index 100% rename from Source/MockWithWrappedMockObject.cs rename to src/Moq/MockWithWrappedMockObject.cs diff --git a/Source/Moq.csproj b/src/Moq/Moq.csproj similarity index 98% rename from Source/Moq.csproj rename to src/Moq/Moq.csproj index 514ed3806..16a8c7dd4 100644 --- a/Source/Moq.csproj +++ b/src/Moq/Moq.csproj @@ -3,7 +3,7 @@ net45;netstandard1.3 Moq - ../Moq.snk + ..\..\Moq.snk True full bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml diff --git a/Source/Obsolete/IOccurrence.cs b/src/Moq/Obsolete/IOccurrence.cs similarity index 100% rename from Source/Obsolete/IOccurrence.cs rename to src/Moq/Obsolete/IOccurrence.cs diff --git a/Source/Obsolete/MatcherAttribute.cs b/src/Moq/Obsolete/MatcherAttribute.cs similarity index 100% rename from Source/Obsolete/MatcherAttribute.cs rename to src/Moq/Obsolete/MatcherAttribute.cs diff --git a/Source/Obsolete/Mock.Generic.Legacy.cs b/src/Moq/Obsolete/Mock.Generic.Legacy.cs similarity index 100% rename from Source/Obsolete/Mock.Generic.Legacy.cs rename to src/Moq/Obsolete/Mock.Generic.Legacy.cs diff --git a/Source/Obsolete/Mock.Legacy.cs b/src/Moq/Obsolete/Mock.Legacy.cs similarity index 100% rename from Source/Obsolete/Mock.Legacy.cs rename to src/Moq/Obsolete/Mock.Legacy.cs diff --git a/Source/Obsolete/MockExtensions.cs b/src/Moq/Obsolete/MockExtensions.cs similarity index 100% rename from Source/Obsolete/MockExtensions.cs rename to src/Moq/Obsolete/MockExtensions.cs diff --git a/Source/Obsolete/MockFactory.cs b/src/Moq/Obsolete/MockFactory.cs similarity index 100% rename from Source/Obsolete/MockFactory.cs rename to src/Moq/Obsolete/MockFactory.cs diff --git a/Source/Obsolete/ObsoleteMockExtensions.cs b/src/Moq/Obsolete/ObsoleteMockExtensions.cs similarity index 100% rename from Source/Obsolete/ObsoleteMockExtensions.cs rename to src/Moq/Obsolete/ObsoleteMockExtensions.cs diff --git a/Source/Obsolete/SequenceExtensions.cs b/src/Moq/Obsolete/SequenceExtensions.cs similarity index 100% rename from Source/Obsolete/SequenceExtensions.cs rename to src/Moq/Obsolete/SequenceExtensions.cs diff --git a/Source/PexProtector.cs b/src/Moq/PexProtector.cs similarity index 100% rename from Source/PexProtector.cs rename to src/Moq/PexProtector.cs diff --git a/Source/Properties/AssemblyInfo.cs b/src/Moq/Properties/AssemblyInfo.cs similarity index 100% rename from Source/Properties/AssemblyInfo.cs rename to src/Moq/Properties/AssemblyInfo.cs diff --git a/Source/Properties/GlobalSuppressions.cs b/src/Moq/Properties/GlobalSuppressions.cs similarity index 100% rename from Source/Properties/GlobalSuppressions.cs rename to src/Moq/Properties/GlobalSuppressions.cs diff --git a/Source/Properties/Resources.Designer.cs b/src/Moq/Properties/Resources.Designer.cs similarity index 100% rename from Source/Properties/Resources.Designer.cs rename to src/Moq/Properties/Resources.Designer.cs diff --git a/Source/Properties/Resources.resx b/src/Moq/Properties/Resources.resx similarity index 100% rename from Source/Properties/Resources.resx rename to src/Moq/Properties/Resources.resx diff --git a/Source/PropertyGetterMethodCall.cs b/src/Moq/PropertyGetterMethodCall.cs similarity index 100% rename from Source/PropertyGetterMethodCall.cs rename to src/Moq/PropertyGetterMethodCall.cs diff --git a/Source/PropertySetterMethodCall.cs b/src/Moq/PropertySetterMethodCall.cs similarity index 100% rename from Source/PropertySetterMethodCall.cs rename to src/Moq/PropertySetterMethodCall.cs diff --git a/Source/Protected/IProtectedAsMock.cs b/src/Moq/Protected/IProtectedAsMock.cs similarity index 100% rename from Source/Protected/IProtectedAsMock.cs rename to src/Moq/Protected/IProtectedAsMock.cs diff --git a/Source/Protected/IProtectedMock.cs b/src/Moq/Protected/IProtectedMock.cs similarity index 100% rename from Source/Protected/IProtectedMock.cs rename to src/Moq/Protected/IProtectedMock.cs diff --git a/Source/Protected/ItExpr.cs b/src/Moq/Protected/ItExpr.cs similarity index 100% rename from Source/Protected/ItExpr.cs rename to src/Moq/Protected/ItExpr.cs diff --git a/Source/Protected/ProtectedAsMock.cs b/src/Moq/Protected/ProtectedAsMock.cs similarity index 100% rename from Source/Protected/ProtectedAsMock.cs rename to src/Moq/Protected/ProtectedAsMock.cs diff --git a/Source/Protected/ProtectedExtension.cs b/src/Moq/Protected/ProtectedExtension.cs similarity index 100% rename from Source/Protected/ProtectedExtension.cs rename to src/Moq/Protected/ProtectedExtension.cs diff --git a/Source/Protected/ProtectedMock.cs b/src/Moq/Protected/ProtectedMock.cs similarity index 100% rename from Source/Protected/ProtectedMock.cs rename to src/Moq/Protected/ProtectedMock.cs diff --git a/Source/ProxyFactories/CastleProxyFactory.cs b/src/Moq/ProxyFactories/CastleProxyFactory.cs similarity index 100% rename from Source/ProxyFactories/CastleProxyFactory.cs rename to src/Moq/ProxyFactories/CastleProxyFactory.cs diff --git a/Source/ProxyFactories/InterfaceProxy.cs b/src/Moq/ProxyFactories/InterfaceProxy.cs similarity index 100% rename from Source/ProxyFactories/InterfaceProxy.cs rename to src/Moq/ProxyFactories/InterfaceProxy.cs diff --git a/Source/ProxyFactories/ProxyFactory.cs b/src/Moq/ProxyFactories/ProxyFactory.cs similarity index 100% rename from Source/ProxyFactories/ProxyFactory.cs rename to src/Moq/ProxyFactories/ProxyFactory.cs diff --git a/Source/Range.cs b/src/Moq/Range.cs similarity index 100% rename from Source/Range.cs rename to src/Moq/Range.cs diff --git a/Source/ReturnsExtensions.Generated.cs b/src/Moq/ReturnsExtensions.Generated.cs similarity index 100% rename from Source/ReturnsExtensions.Generated.cs rename to src/Moq/ReturnsExtensions.Generated.cs diff --git a/Source/ReturnsExtensions.cs b/src/Moq/ReturnsExtensions.cs similarity index 100% rename from Source/ReturnsExtensions.cs rename to src/Moq/ReturnsExtensions.cs diff --git a/Source/ReturnsExtensions.tt b/src/Moq/ReturnsExtensions.tt similarity index 100% rename from Source/ReturnsExtensions.tt rename to src/Moq/ReturnsExtensions.tt diff --git a/Source/SequenceExtensions.cs b/src/Moq/SequenceExtensions.cs similarity index 100% rename from Source/SequenceExtensions.cs rename to src/Moq/SequenceExtensions.cs diff --git a/Source/SequenceMethodCall.cs b/src/Moq/SequenceMethodCall.cs similarity index 100% rename from Source/SequenceMethodCall.cs rename to src/Moq/SequenceMethodCall.cs diff --git a/Source/SetterMethodCall.cs b/src/Moq/SetterMethodCall.cs similarity index 100% rename from Source/SetterMethodCall.cs rename to src/Moq/SetterMethodCall.cs diff --git a/Source/SetupCollection.cs b/src/Moq/SetupCollection.cs similarity index 100% rename from Source/SetupCollection.cs rename to src/Moq/SetupCollection.cs diff --git a/Source/StringBuilderExtensions.cs b/src/Moq/StringBuilderExtensions.cs similarity index 100% rename from Source/StringBuilderExtensions.cs rename to src/Moq/StringBuilderExtensions.cs diff --git a/Source/Switches.cs b/src/Moq/Switches.cs similarity index 100% rename from Source/Switches.cs rename to src/Moq/Switches.cs diff --git a/Source/Times.cs b/src/Moq/Times.cs similarity index 100% rename from Source/Times.cs rename to src/Moq/Times.cs diff --git a/Source/Times.xdoc b/src/Moq/Times.xdoc similarity index 100% rename from Source/Times.xdoc rename to src/Moq/Times.xdoc diff --git a/Moq.Tests.VisualBasic/IssueReports.vb b/tests/Moq.Tests.VisualBasic/IssueReports.vb similarity index 100% rename from Moq.Tests.VisualBasic/IssueReports.vb rename to tests/Moq.Tests.VisualBasic/IssueReports.vb diff --git a/Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj b/tests/Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj similarity index 79% rename from Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj rename to tests/Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj index e3d455a46..ad409dc13 100644 --- a/Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj +++ b/tests/Moq.Tests.VisualBasic/Moq.Tests.VisualBasic.vbproj @@ -1,8 +1,8 @@ - + net46;netcoreapp2.0 - ../Moq.snk + ..\..\Moq.snk True full @@ -19,7 +19,7 @@ - + diff --git a/Moq.Tests/AsInterfaceFixture.cs b/tests/Moq.Tests/AsInterfaceFixture.cs similarity index 100% rename from Moq.Tests/AsInterfaceFixture.cs rename to tests/Moq.Tests/AsInterfaceFixture.cs diff --git a/Moq.Tests/CallbacksFixture.cs b/tests/Moq.Tests/CallbacksFixture.cs similarity index 100% rename from Moq.Tests/CallbacksFixture.cs rename to tests/Moq.Tests/CallbacksFixture.cs diff --git a/Moq.Tests/CaptureFixture.cs b/tests/Moq.Tests/CaptureFixture.cs similarity index 100% rename from Moq.Tests/CaptureFixture.cs rename to tests/Moq.Tests/CaptureFixture.cs diff --git a/Moq.Tests/CaptureMatchFixture.cs b/tests/Moq.Tests/CaptureMatchFixture.cs similarity index 100% rename from Moq.Tests/CaptureMatchFixture.cs rename to tests/Moq.Tests/CaptureMatchFixture.cs diff --git a/Moq.Tests/ConditionalSetupFixture.cs b/tests/Moq.Tests/ConditionalSetupFixture.cs similarity index 100% rename from Moq.Tests/ConditionalSetupFixture.cs rename to tests/Moq.Tests/ConditionalSetupFixture.cs diff --git a/Moq.Tests/CustomDefaultValueProviderFixture.cs b/tests/Moq.Tests/CustomDefaultValueProviderFixture.cs similarity index 100% rename from Moq.Tests/CustomDefaultValueProviderFixture.cs rename to tests/Moq.Tests/CustomDefaultValueProviderFixture.cs diff --git a/Moq.Tests/CustomMatcherFixture.cs b/tests/Moq.Tests/CustomMatcherFixture.cs similarity index 100% rename from Moq.Tests/CustomMatcherFixture.cs rename to tests/Moq.Tests/CustomMatcherFixture.cs diff --git a/Moq.Tests/DefaultValueProviderFixture.cs b/tests/Moq.Tests/DefaultValueProviderFixture.cs similarity index 100% rename from Moq.Tests/DefaultValueProviderFixture.cs rename to tests/Moq.Tests/DefaultValueProviderFixture.cs diff --git a/Moq.Tests/Demo.cs b/tests/Moq.Tests/Demo.cs similarity index 100% rename from Moq.Tests/Demo.cs rename to tests/Moq.Tests/Demo.cs diff --git a/Moq.Tests/EmptyDefaultValueProviderFixture.cs b/tests/Moq.Tests/EmptyDefaultValueProviderFixture.cs similarity index 100% rename from Moq.Tests/EmptyDefaultValueProviderFixture.cs rename to tests/Moq.Tests/EmptyDefaultValueProviderFixture.cs diff --git a/Moq.Tests/ExpressionExtensionsFixture.cs b/tests/Moq.Tests/ExpressionExtensionsFixture.cs similarity index 100% rename from Moq.Tests/ExpressionExtensionsFixture.cs rename to tests/Moq.Tests/ExpressionExtensionsFixture.cs diff --git a/Moq.Tests/ExtensibilityFixture.cs b/tests/Moq.Tests/ExtensibilityFixture.cs similarity index 100% rename from Moq.Tests/ExtensibilityFixture.cs rename to tests/Moq.Tests/ExtensibilityFixture.cs diff --git a/Moq.Tests/ExtensionsFixture.cs b/tests/Moq.Tests/ExtensionsFixture.cs similarity index 100% rename from Moq.Tests/ExtensionsFixture.cs rename to tests/Moq.Tests/ExtensionsFixture.cs diff --git a/Moq.Tests/GeneratedReturnsExtensionsFixture.cs b/tests/Moq.Tests/GeneratedReturnsExtensionsFixture.cs similarity index 100% rename from Moq.Tests/GeneratedReturnsExtensionsFixture.cs rename to tests/Moq.Tests/GeneratedReturnsExtensionsFixture.cs diff --git a/Moq.Tests/InvocationsFixture.cs b/tests/Moq.Tests/InvocationsFixture.cs similarity index 100% rename from Moq.Tests/InvocationsFixture.cs rename to tests/Moq.Tests/InvocationsFixture.cs diff --git a/Moq.Tests/Linq/MockRepositoryQuerying.cs b/tests/Moq.Tests/Linq/MockRepositoryQuerying.cs similarity index 100% rename from Moq.Tests/Linq/MockRepositoryQuerying.cs rename to tests/Moq.Tests/Linq/MockRepositoryQuerying.cs diff --git a/Moq.Tests/Linq/QueryableMocksFixture.cs b/tests/Moq.Tests/Linq/QueryableMocksFixture.cs similarity index 100% rename from Moq.Tests/Linq/QueryableMocksFixture.cs rename to tests/Moq.Tests/Linq/QueryableMocksFixture.cs diff --git a/Moq.Tests/Linq/SupportedQuerying.cs b/tests/Moq.Tests/Linq/SupportedQuerying.cs similarity index 100% rename from Moq.Tests/Linq/SupportedQuerying.cs rename to tests/Moq.Tests/Linq/SupportedQuerying.cs diff --git a/Moq.Tests/Linq/UnsupportedQuerying.cs b/tests/Moq.Tests/Linq/UnsupportedQuerying.cs similarity index 100% rename from Moq.Tests/Linq/UnsupportedQuerying.cs rename to tests/Moq.Tests/Linq/UnsupportedQuerying.cs diff --git a/Moq.Tests/LookupOrFallbackDefaultValueProviderFixture.cs b/tests/Moq.Tests/LookupOrFallbackDefaultValueProviderFixture.cs similarity index 100% rename from Moq.Tests/LookupOrFallbackDefaultValueProviderFixture.cs rename to tests/Moq.Tests/LookupOrFallbackDefaultValueProviderFixture.cs diff --git a/Moq.Tests/MatcherAttributeFixture.cs b/tests/Moq.Tests/MatcherAttributeFixture.cs similarity index 100% rename from Moq.Tests/MatcherAttributeFixture.cs rename to tests/Moq.Tests/MatcherAttributeFixture.cs diff --git a/Moq.Tests/Matchers/AnyMatcherFixture.cs b/tests/Moq.Tests/Matchers/AnyMatcherFixture.cs similarity index 100% rename from Moq.Tests/Matchers/AnyMatcherFixture.cs rename to tests/Moq.Tests/Matchers/AnyMatcherFixture.cs diff --git a/Moq.Tests/MatchersFixture.cs b/tests/Moq.Tests/MatchersFixture.cs similarity index 100% rename from Moq.Tests/MatchersFixture.cs rename to tests/Moq.Tests/MatchersFixture.cs diff --git a/Moq.Tests/MockBehaviorFixture.cs b/tests/Moq.Tests/MockBehaviorFixture.cs similarity index 100% rename from Moq.Tests/MockBehaviorFixture.cs rename to tests/Moq.Tests/MockBehaviorFixture.cs diff --git a/Moq.Tests/MockDefaultValueProviderFixture.cs b/tests/Moq.Tests/MockDefaultValueProviderFixture.cs similarity index 100% rename from Moq.Tests/MockDefaultValueProviderFixture.cs rename to tests/Moq.Tests/MockDefaultValueProviderFixture.cs diff --git a/Moq.Tests/MockFixture.cs b/tests/Moq.Tests/MockFixture.cs similarity index 100% rename from Moq.Tests/MockFixture.cs rename to tests/Moq.Tests/MockFixture.cs diff --git a/Moq.Tests/MockRepositoryFixture.cs b/tests/Moq.Tests/MockRepositoryFixture.cs similarity index 100% rename from Moq.Tests/MockRepositoryFixture.cs rename to tests/Moq.Tests/MockRepositoryFixture.cs diff --git a/Moq.Tests/MockSequenceFixture.cs b/tests/Moq.Tests/MockSequenceFixture.cs similarity index 100% rename from Moq.Tests/MockSequenceFixture.cs rename to tests/Moq.Tests/MockSequenceFixture.cs diff --git a/Moq.Tests/MockedDelegatesFixture.cs b/tests/Moq.Tests/MockedDelegatesFixture.cs similarity index 100% rename from Moq.Tests/MockedDelegatesFixture.cs rename to tests/Moq.Tests/MockedDelegatesFixture.cs diff --git a/Moq.Tests/MockedEventsFixture.cs b/tests/Moq.Tests/MockedEventsFixture.cs similarity index 100% rename from Moq.Tests/MockedEventsFixture.cs rename to tests/Moq.Tests/MockedEventsFixture.cs diff --git a/Moq.Tests/MockedFixture.cs b/tests/Moq.Tests/MockedFixture.cs similarity index 100% rename from Moq.Tests/MockedFixture.cs rename to tests/Moq.Tests/MockedFixture.cs diff --git a/Moq.Tests/Moq.Tests.csproj b/tests/Moq.Tests/Moq.Tests.csproj similarity index 94% rename from Moq.Tests/Moq.Tests.csproj rename to tests/Moq.Tests/Moq.Tests.csproj index 53fdf1a5b..0deb2ba30 100644 --- a/Moq.Tests/Moq.Tests.csproj +++ b/tests/Moq.Tests/Moq.Tests.csproj @@ -3,7 +3,7 @@ net46;netcoreapp2.0 Moq.Tests - ../Moq.snk + ..\..\Moq.snk True full true @@ -26,7 +26,7 @@ - + diff --git a/Moq.Tests/OccurrenceFixture.cs b/tests/Moq.Tests/OccurrenceFixture.cs similarity index 100% rename from Moq.Tests/OccurrenceFixture.cs rename to tests/Moq.Tests/OccurrenceFixture.cs diff --git a/Moq.Tests/OutRefFixture.cs b/tests/Moq.Tests/OutRefFixture.cs similarity index 100% rename from Moq.Tests/OutRefFixture.cs rename to tests/Moq.Tests/OutRefFixture.cs diff --git a/Moq.Tests/Properties/AssemblyInfo.cs b/tests/Moq.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from Moq.Tests/Properties/AssemblyInfo.cs rename to tests/Moq.Tests/Properties/AssemblyInfo.cs diff --git a/Moq.Tests/PropertiesFixture.cs b/tests/Moq.Tests/PropertiesFixture.cs similarity index 100% rename from Moq.Tests/PropertiesFixture.cs rename to tests/Moq.Tests/PropertiesFixture.cs diff --git a/Moq.Tests/ProtectedAsMockFixture.cs b/tests/Moq.Tests/ProtectedAsMockFixture.cs similarity index 100% rename from Moq.Tests/ProtectedAsMockFixture.cs rename to tests/Moq.Tests/ProtectedAsMockFixture.cs diff --git a/Moq.Tests/ProtectedMockFixture.cs b/tests/Moq.Tests/ProtectedMockFixture.cs similarity index 100% rename from Moq.Tests/ProtectedMockFixture.cs rename to tests/Moq.Tests/ProtectedMockFixture.cs diff --git a/Moq.Tests/RecursiveMocksFixture.cs b/tests/Moq.Tests/RecursiveMocksFixture.cs similarity index 100% rename from Moq.Tests/RecursiveMocksFixture.cs rename to tests/Moq.Tests/RecursiveMocksFixture.cs diff --git a/Moq.Tests/Regressions/FluentMockIssues.cs b/tests/Moq.Tests/Regressions/FluentMockIssues.cs similarity index 100% rename from Moq.Tests/Regressions/FluentMockIssues.cs rename to tests/Moq.Tests/Regressions/FluentMockIssues.cs diff --git a/Moq.Tests/Regressions/IssueReportsFixture.cs b/tests/Moq.Tests/Regressions/IssueReportsFixture.cs similarity index 100% rename from Moq.Tests/Regressions/IssueReportsFixture.cs rename to tests/Moq.Tests/Regressions/IssueReportsFixture.cs diff --git a/Moq.Tests/Regressions/StreamFixture.cs b/tests/Moq.Tests/Regressions/StreamFixture.cs similarity index 100% rename from Moq.Tests/Regressions/StreamFixture.cs rename to tests/Moq.Tests/Regressions/StreamFixture.cs diff --git a/Moq.Tests/ReturnsExtensionsFixture.cs b/tests/Moq.Tests/ReturnsExtensionsFixture.cs similarity index 100% rename from Moq.Tests/ReturnsExtensionsFixture.cs rename to tests/Moq.Tests/ReturnsExtensionsFixture.cs diff --git a/Moq.Tests/ReturnsFixture.cs b/tests/Moq.Tests/ReturnsFixture.cs similarity index 100% rename from Moq.Tests/ReturnsFixture.cs rename to tests/Moq.Tests/ReturnsFixture.cs diff --git a/Moq.Tests/ReturnsValidationFixture.cs b/tests/Moq.Tests/ReturnsValidationFixture.cs similarity index 100% rename from Moq.Tests/ReturnsValidationFixture.cs rename to tests/Moq.Tests/ReturnsValidationFixture.cs diff --git a/Moq.Tests/SequenceExtensionsFixture.cs b/tests/Moq.Tests/SequenceExtensionsFixture.cs similarity index 100% rename from Moq.Tests/SequenceExtensionsFixture.cs rename to tests/Moq.Tests/SequenceExtensionsFixture.cs diff --git a/Moq.Tests/SequentialActionExtensionsFixture.cs b/tests/Moq.Tests/SequentialActionExtensionsFixture.cs similarity index 100% rename from Moq.Tests/SequentialActionExtensionsFixture.cs rename to tests/Moq.Tests/SequentialActionExtensionsFixture.cs diff --git a/Moq.Tests/StubExtensionsFixture.cs b/tests/Moq.Tests/StubExtensionsFixture.cs similarity index 100% rename from Moq.Tests/StubExtensionsFixture.cs rename to tests/Moq.Tests/StubExtensionsFixture.cs diff --git a/Moq.Tests/TimesFixture.cs b/tests/Moq.Tests/TimesFixture.cs similarity index 100% rename from Moq.Tests/TimesFixture.cs rename to tests/Moq.Tests/TimesFixture.cs diff --git a/Moq.Tests/VerifyFixture.cs b/tests/Moq.Tests/VerifyFixture.cs similarity index 100% rename from Moq.Tests/VerifyFixture.cs rename to tests/Moq.Tests/VerifyFixture.cs