예제 #1
0
        public void GenerateUser_NameRequired()
        {
            UserEntity entity = _generator.GenerateUser();
            string     name   = entity.Name;

            Assert.That(name, Is.Not.Empty);
        }
예제 #2
0
        public void Write(string filePath, int entityCount)
        {
            using (TextWriter writer = new StreamWriter(filePath))
            {
                string insertLine = _generator.GetInsertLine();
                writer.WriteLine(insertLine);

                for (int i = 1; i <= entityCount; i++)
                {
                    if (i > 1)
                    {
                        writer.Write(",");
                    }

                    UserEntity user      = _generator.GenerateUser();
                    string     valueLine = _generator.GetValueLine(user);
                    writer.WriteLine(valueLine);
                }
            }
        }