<commit_before>﻿using Microsoft.AspNet.Identity.EntityFramework;
using NUnit.Framework;
using ZobShop.Models;

namespace ZobShop.Tests.Models.UserTests
{
    [TestFixture]
    public class UserConstructorTests
    {
        [Test]
        public void Constructor_Should_InitializeUserCorrectly()
        {
            var user = new User();

            Assert.IsNotNull(user);
        }

        [Test]
        public void Constructor_Should_BeInstanceOfIdentityUser()
        {
            var user = new User();

            Assert.IsInstanceOf<IdentityUser>(user);
        }
    }
}<commit_msg>Add new user constructor tests<commit_after>﻿using Microsoft.AspNet.Identity.EntityFramework;
using NUnit.Framework;
using ZobShop.Models;

namespace ZobShop.Tests.Models.UserTests
{
    [TestFixture]
    public class UserConstructorTests
    {
        [Test]
        public void Constructor_Should_InitializeUserCorrectly()
        {
            var user = new User();

            Assert.IsNotNull(user);
        }

        [Test]
        public void Constructor_Should_BeInstanceOfIdentityUser()
        {
            var user = new User();

            Assert.IsInstanceOf<IdentityUser>(user);
        }

        [TestCase("pesho", "<EMAIL>", "Peter", "0881768356", "1 Peshova street")]
        public void Constructor_ShouldSetUsernameCorrectly(string username, string email, string name, string phoneNumber, string address)
        {
            var user = new User(username, email, name, phoneNumber, address);

            Assert.AreEqual(username, user.UserName);
        }

        [TestCase("pesho", "<EMAIL>", "Peter", "0881768356", "1 Peshova street")]
        public void Constructor_ShouldSetNameCorrectly(string username, string email, string name, string phoneNumber, string address)
        {
            var user = new User(username, email, name, phoneNumber, address);

            Assert.AreEqual(name, user.Name);
        }

        [TestCase("pesho", "<EMAIL>", "Peter", "0881768356", "1 Peshova street")]
        public void Constructor_ShouldSeEmailCorrectly(string username, string email, string name, string phoneNumber, string address)
        {
            var user = new User(username, email, name, phoneNumber, address);

            Assert.AreEqual(email, user.Email);
        }

        [TestCase("pesho", "<EMAIL>", "Peter", "0881768356", "1 Peshova street")]
        public void Constructor_ShouldSetPhoneNumberCorrectly(string username, string email, string name, string phoneNumber, string address)
        {
            var user = new User(username, email, name, phoneNumber, address);

            Assert.AreEqual(phoneNumber, user.PhoneNumber);
        }

        [TestCase("pesho", "<EMAIL>", "Peter", "0881768356", "1 Peshova street")]
        public void Constructor_ShouldSetAddressCorrectly(string username, string email, string name, string phoneNumber, string address)
        {
            var user = new User(username, email, name, phoneNumber, address);

            Assert.AreEqual(address, user.Address);
        }
    }
}
{'fraction_non_alphanumeric': 0.1015625, 'fraction_numerical': 0.017903645833333332, 'mean_word_length': 2.7158403869407497, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2979000', 'n_tokens_mistral': 862, 'n_tokens_neox': 806, 'n_words': 209}