using MileageTraker.Web.ViewModels.User;
using NUnit.Framework;

namespace Web.Tests.ViewModels
{
	[TestFixture]
	public class CreateUserViewModelTests
	{
		[Test]
		public void ToUser_CopiesProperties()
		{
			var vm = new CreateUserViewModel();

			var email = vm.Email = "bob@dobalina.com";
			var userName = vm.Username = "bob dobalina";

			var user = vm.ToUser();

			Assert.That(user.Email, Is.EqualTo(email));
			Assert.That(user.Username, Is.EqualTo(userName));
		}
	}
}
