public void CreateUserUsingInvalidData()
{
Trace.WriteLine("user test");
var ex = Assert.Throws<BusinessValidationException>(() => this.CreateUser(
noDefaultRole: true,
name: new string('a', MetadataInfo.StringNormal + 1),
email: string.Empty));
Trace.WriteLine(ex.Message);
Assert.That(ex.Errors.Count(), Is.EqualTo(3));
Trace.WriteLine("password test");
ex = Assert.Throws<BusinessValidationException>(() => this.CreateUser(
password: new string('a', MetadataInfo.StringNormal + 1),
role: new RoleEntity()));
Trace.WriteLine(ex.Message);
Assert.That(ex.Errors.Count(), Is.EqualTo(1));
Trace.WriteLine("login test");
ex = Assert.Throws<BusinessValidationException>(() => this.CreateUser(
login: new string('a', MetadataInfo.StringNormal + 1),
role: new RoleEntity()));
Trace.WriteLine(ex.Message);
Assert.That(ex.Errors.Count(), Is.EqualTo(1));
}