mirror of
https://github.com/farcasclaudiu/myfriendsaround.git
synced 2026-06-29 13:02:05 +03:00
cleanup
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!--
|
|
||||||
Note: Add entries to the App.config file for configuration settings
|
|
||||||
that apply only to the Test project.
|
|
||||||
-->
|
|
||||||
<configuration>
|
|
||||||
<appSettings>
|
|
||||||
|
|
||||||
</appSettings>
|
|
||||||
|
|
||||||
<connectionStrings>
|
|
||||||
|
|
||||||
</connectionStrings>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,449 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Security.Principal;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using System.Web.Routing;
|
|
||||||
using System.Web.Security;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MyFriendsAround.Web;
|
|
||||||
using MyFriendsAround.Web.Controllers;
|
|
||||||
using MyFriendsAround.Web.Models;
|
|
||||||
|
|
||||||
namespace MyFriendsAround.Web.Tests.Controllers
|
|
||||||
{
|
|
||||||
|
|
||||||
[TestClass]
|
|
||||||
public class AccountControllerTest
|
|
||||||
{
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void ChangePassword_Get_ReturnsView()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.ChangePassword();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
Assert.AreEqual(10, ((ViewResult)result).ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void ChangePassword_Post_ReturnsRedirectOnSuccess()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
ChangePasswordModel model = new ChangePasswordModel()
|
|
||||||
{
|
|
||||||
OldPassword = "goodOldPassword",
|
|
||||||
NewPassword = "goodNewPassword",
|
|
||||||
ConfirmPassword = "goodNewPassword"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.ChangePassword(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
|
|
||||||
RedirectToRouteResult redirectResult = (RedirectToRouteResult)result;
|
|
||||||
Assert.AreEqual("ChangePasswordSuccess", redirectResult.RouteValues["action"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void ChangePassword_Post_ReturnsViewIfChangePasswordFails()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
ChangePasswordModel model = new ChangePasswordModel()
|
|
||||||
{
|
|
||||||
OldPassword = "goodOldPassword",
|
|
||||||
NewPassword = "badNewPassword",
|
|
||||||
ConfirmPassword = "badNewPassword"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.ChangePassword(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
Assert.AreEqual("The current password is incorrect or the new password is invalid.", controller.ModelState[""].Errors[0].ErrorMessage);
|
|
||||||
Assert.AreEqual(10, viewResult.ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void ChangePassword_Post_ReturnsViewIfModelStateIsInvalid()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
ChangePasswordModel model = new ChangePasswordModel()
|
|
||||||
{
|
|
||||||
OldPassword = "goodOldPassword",
|
|
||||||
NewPassword = "goodNewPassword",
|
|
||||||
ConfirmPassword = "goodNewPassword"
|
|
||||||
};
|
|
||||||
controller.ModelState.AddModelError("", "Dummy error message.");
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.ChangePassword(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
Assert.AreEqual(10, viewResult.ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void ChangePasswordSuccess_ReturnsView()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.ChangePasswordSuccess();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOff_LogsOutAndRedirects()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOff();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
|
|
||||||
RedirectToRouteResult redirectResult = (RedirectToRouteResult)result;
|
|
||||||
Assert.AreEqual("Home", redirectResult.RouteValues["controller"]);
|
|
||||||
Assert.AreEqual("Index", redirectResult.RouteValues["action"]);
|
|
||||||
Assert.IsTrue(((MockFormsAuthenticationService)controller.FormsService).SignOut_WasCalled);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Get_ReturnsView()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Post_ReturnsRedirectOnSuccess_WithoutReturnUrl()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
LogOnModel model = new LogOnModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Password = "goodPassword",
|
|
||||||
RememberMe = false
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn(model, null);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
|
|
||||||
RedirectToRouteResult redirectResult = (RedirectToRouteResult)result;
|
|
||||||
Assert.AreEqual("Home", redirectResult.RouteValues["controller"]);
|
|
||||||
Assert.AreEqual("Index", redirectResult.RouteValues["action"]);
|
|
||||||
Assert.IsTrue(((MockFormsAuthenticationService)controller.FormsService).SignIn_WasCalled);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Post_ReturnsRedirectOnSuccess_WithLocalReturnUrl()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
LogOnModel model = new LogOnModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Password = "goodPassword",
|
|
||||||
RememberMe = false
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn(model, "/someUrl");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectResult));
|
|
||||||
RedirectResult redirectResult = (RedirectResult)result;
|
|
||||||
Assert.AreEqual("/someUrl", redirectResult.Url);
|
|
||||||
Assert.IsTrue(((MockFormsAuthenticationService)controller.FormsService).SignIn_WasCalled);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Post_ReturnsRedirectToHomeOnSuccess_WithExternalReturnUrl()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
LogOnModel model = new LogOnModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Password = "goodPassword",
|
|
||||||
RememberMe = false
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn(model, "http://malicious.example.net");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
|
|
||||||
RedirectToRouteResult redirectResult = (RedirectToRouteResult)result;
|
|
||||||
Assert.AreEqual("Home", redirectResult.RouteValues["controller"]);
|
|
||||||
Assert.AreEqual("Index", redirectResult.RouteValues["action"]);
|
|
||||||
Assert.IsTrue(((MockFormsAuthenticationService)controller.FormsService).SignIn_WasCalled);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Post_ReturnsViewIfModelStateIsInvalid()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
LogOnModel model = new LogOnModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Password = "goodPassword",
|
|
||||||
RememberMe = false
|
|
||||||
};
|
|
||||||
controller.ModelState.AddModelError("", "Dummy error message.");
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn(model, null);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void LogOn_Post_ReturnsViewIfValidateUserFails()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
LogOnModel model = new LogOnModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Password = "badPassword",
|
|
||||||
RememberMe = false
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.LogOn(model, null);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
Assert.AreEqual("The user name or password provided is incorrect.", controller.ModelState[""].Errors[0].ErrorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void Register_Get_ReturnsView()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.Register();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
Assert.AreEqual(10, ((ViewResult)result).ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void Register_Post_ReturnsRedirectOnSuccess()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
RegisterModel model = new RegisterModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Email = "goodEmail",
|
|
||||||
Password = "goodPassword",
|
|
||||||
ConfirmPassword = "goodPassword"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.Register(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
|
|
||||||
RedirectToRouteResult redirectResult = (RedirectToRouteResult)result;
|
|
||||||
Assert.AreEqual("Home", redirectResult.RouteValues["controller"]);
|
|
||||||
Assert.AreEqual("Index", redirectResult.RouteValues["action"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void Register_Post_ReturnsViewIfRegistrationFails()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
RegisterModel model = new RegisterModel()
|
|
||||||
{
|
|
||||||
UserName = "duplicateUser",
|
|
||||||
Email = "goodEmail",
|
|
||||||
Password = "goodPassword",
|
|
||||||
ConfirmPassword = "goodPassword"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.Register(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
Assert.AreEqual("Username already exists. Please enter a different user name.", controller.ModelState[""].Errors[0].ErrorMessage);
|
|
||||||
Assert.AreEqual(10, viewResult.ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void Register_Post_ReturnsViewIfModelStateIsInvalid()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
AccountController controller = GetAccountController();
|
|
||||||
RegisterModel model = new RegisterModel()
|
|
||||||
{
|
|
||||||
UserName = "someUser",
|
|
||||||
Email = "goodEmail",
|
|
||||||
Password = "goodPassword",
|
|
||||||
ConfirmPassword = "goodPassword"
|
|
||||||
};
|
|
||||||
controller.ModelState.AddModelError("", "Dummy error message.");
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ActionResult result = controller.Register(model);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsInstanceOfType(result, typeof(ViewResult));
|
|
||||||
ViewResult viewResult = (ViewResult)result;
|
|
||||||
Assert.AreEqual(model, viewResult.ViewData.Model);
|
|
||||||
Assert.AreEqual(10, viewResult.ViewData["PasswordLength"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static AccountController GetAccountController()
|
|
||||||
{
|
|
||||||
RequestContext requestContext = new RequestContext(new MockHttpContext(), new RouteData());
|
|
||||||
AccountController controller = new AccountController()
|
|
||||||
{
|
|
||||||
FormsService = new MockFormsAuthenticationService(),
|
|
||||||
MembershipService = new MockMembershipService(),
|
|
||||||
Url = new UrlHelper(requestContext),
|
|
||||||
};
|
|
||||||
controller.ControllerContext = new ControllerContext()
|
|
||||||
{
|
|
||||||
Controller = controller,
|
|
||||||
RequestContext = requestContext
|
|
||||||
};
|
|
||||||
return controller;
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MockFormsAuthenticationService : IFormsAuthenticationService
|
|
||||||
{
|
|
||||||
public bool SignIn_WasCalled;
|
|
||||||
public bool SignOut_WasCalled;
|
|
||||||
|
|
||||||
public void SignIn(string userName, bool createPersistentCookie)
|
|
||||||
{
|
|
||||||
// verify that the arguments are what we expected
|
|
||||||
Assert.AreEqual("someUser", userName);
|
|
||||||
Assert.IsFalse(createPersistentCookie);
|
|
||||||
|
|
||||||
SignIn_WasCalled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SignOut()
|
|
||||||
{
|
|
||||||
SignOut_WasCalled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MockHttpContext : HttpContextBase
|
|
||||||
{
|
|
||||||
private readonly IPrincipal _user = new GenericPrincipal(new GenericIdentity("someUser"), null /* roles */);
|
|
||||||
private readonly HttpRequestBase _request = new MockHttpRequest();
|
|
||||||
|
|
||||||
public override IPrincipal User
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _user;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
base.User = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override HttpRequestBase Request
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _request;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MockHttpRequest : HttpRequestBase
|
|
||||||
{
|
|
||||||
private readonly Uri _url = new Uri("http://mysite.example.com/");
|
|
||||||
|
|
||||||
public override Uri Url
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class MockMembershipService : IMembershipService
|
|
||||||
{
|
|
||||||
public int MinPasswordLength
|
|
||||||
{
|
|
||||||
get { return 10; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ValidateUser(string userName, string password)
|
|
||||||
{
|
|
||||||
return (userName == "someUser" && password == "goodPassword");
|
|
||||||
}
|
|
||||||
|
|
||||||
public MembershipCreateStatus CreateUser(string userName, string password, string email)
|
|
||||||
{
|
|
||||||
if (userName == "duplicateUser")
|
|
||||||
{
|
|
||||||
return MembershipCreateStatus.DuplicateUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// verify that values are what we expected
|
|
||||||
Assert.AreEqual("goodPassword", password);
|
|
||||||
Assert.AreEqual("goodEmail", email);
|
|
||||||
|
|
||||||
return MembershipCreateStatus.Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ChangePassword(string userName, string oldPassword, string newPassword)
|
|
||||||
{
|
|
||||||
return (userName == "someUser" && oldPassword == "goodOldPassword" && newPassword == "goodNewPassword");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MyFriendsAround.Web;
|
|
||||||
using MyFriendsAround.Web.Controllers;
|
|
||||||
|
|
||||||
namespace MyFriendsAround.Web.Tests.Controllers
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class HomeControllerTest
|
|
||||||
{
|
|
||||||
[TestMethod]
|
|
||||||
public void Index()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
HomeController controller = new HomeController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ViewResult result = controller.Index() as ViewResult;
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.AreEqual("Welcome to ASP.NET MVC!", result.ViewBag.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void About()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
HomeController controller = new HomeController();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
ViewResult result = controller.About() as ViewResult;
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsNotNull(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>
|
|
||||||
</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>MyFriendsAround.Web.Tests</RootNamespace>
|
|
||||||
<AssemblyName>MyFriendsAround.Web.Tests</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Tests|AnyCPU'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\Tests\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\Debug\MyFriendsAround.Web.Tests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
|
||||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
|
||||||
<Reference Include="System.Configuration" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
|
||||||
<Reference Include="System.Web.Extensions" />
|
|
||||||
<Reference Include="System.Web.Abstractions" />
|
|
||||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="System.Web.Routing" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Controllers\HomeControllerTest.cs" />
|
|
||||||
<Compile Include="Controllers\AccountControllerTest.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="App.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\MyFriendsAround.Web\MyFriendsAround.Web.csproj">
|
|
||||||
<Project>{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}</Project>
|
|
||||||
<Name>MyFriendsAround.Web</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
||||||
@@ -1,35 +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("MyFriendsAround.Web.Tests")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Microsoft")]
|
|
||||||
[assembly: AssemblyProduct("MyFriendsAround.Web.Tests")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
|
||||||
[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("f496bfd5-1473-4070-bbed-57cd23844621")]
|
|
||||||
|
|
||||||
// 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")]
|
|
||||||
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 11.00
|
|||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Web", "MyFriendsAround.Web\MyFriendsAround.Web.csproj", "{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Web", "MyFriendsAround.Web\MyFriendsAround.Web.csproj", "{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Web.Tests", "MyFriendsAround.Web.Tests\MyFriendsAround.Web.Tests.csproj", "{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Common", "MyFriendsAround.Common\MyFriendsAround.Common.csproj", "{80664694-C63F-4653-B3FC-617AEC468B3C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Common", "MyFriendsAround.Common\MyFriendsAround.Common.csproj", "{80664694-C63F-4653-B3FC-617AEC468B3C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Data", "MyFriendsAround.Data\MyFriendsAround.Data.csproj", "{C3D31B22-BFF4-4DF1-A1EC-C8F158DEEB33}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyFriendsAround.Data", "MyFriendsAround.Data\MyFriendsAround.Data.csproj", "{C3D31B22-BFF4-4DF1-A1EC-C8F158DEEB33}"
|
||||||
@@ -64,21 +62,6 @@ Global
|
|||||||
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|Mixed Platforms.ActiveCfg = Tests|Any CPU
|
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|Mixed Platforms.ActiveCfg = Tests|Any CPU
|
||||||
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|Mixed Platforms.Build.0 = Tests|Any CPU
|
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|Mixed Platforms.Build.0 = Tests|Any CPU
|
||||||
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|x86.ActiveCfg = Tests|Any CPU
|
{41FDB0B4-0F93-4D1C-99C1-57F4A7E7EF3D}.Tests|x86.ActiveCfg = Tests|Any CPU
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Tests|Any CPU.ActiveCfg = Tests|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Tests|Any CPU.Build.0 = Tests|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Tests|Mixed Platforms.ActiveCfg = Tests|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Tests|Mixed Platforms.Build.0 = Tests|Any CPU
|
|
||||||
{9FBA5EA7-7308-4B39-ADE9-DF2EB28C116F}.Tests|x86.ActiveCfg = Tests|Any CPU
|
|
||||||
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
{80664694-C63F-4653-B3FC-617AEC468B3C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||||
|
|||||||
Reference in New Issue
Block a user