Amss.Boilerplate.Tests.Persistence.SpecificationTests.UserPasswordCredentialSpecification C# (CSharp) Method

UserPasswordCredentialSpecification() private method

private UserPasswordCredentialSpecification ( ) : void
return void
        public void UserPasswordCredentialSpecification()
        {
            var role = new PersistenceSpecification<RoleEntity>(this.Session)
                .CheckProperty(c => c.Name, this.ShortStringGenerator.GetRandomValue())
            .VerifyTheMappings();

            var user = new PersistenceSpecification<UserEntity>(this.Session)
                .CheckProperty(c => c.Name, this.ShortStringGenerator.GetRandomValue())
                .CheckProperty(c => c.Email, this.ShortStringGenerator.GetRandomValue())
                .CheckEntity(c => c.Role, role)
            .VerifyTheMappings();

            var credential = new PersistenceSpecification<UserPasswordCredentialEntity>(this.Session)
                .CheckProperty(c => c.Login, this.ShortStringGenerator.GetRandomValue())
                .CheckProperty(c => c.PasswordHash, this.ShortStringGenerator.GetRandomValue())
                .CheckProperty(c => c.PasswordSalt, this.ShortStringGenerator.GetRandomValue())
                .CheckEntity(c => c.User, user)
            .VerifyTheMappings();

            Assert.That(credential.User.UserPasswordCredential, Is.Not.Null);
        }