public void When_Filename_Is_Empty_Then_UserList_Is_Empty()
        {
            // Setup
            var reader = new FileUserListReader();

            // Execute
            var result = reader.GetUserNamesFromList(string.Empty);

            // Verify
            Assert.AreEqual(0, result.Count());
        }
        public void When_File_Contains_Valid_Content_Then_UserList_Contains_User_Names()
        {
            // Setup
            const string FILE_CONTENT = "User1\nUser2";
            var fileName = CreateFileWithContent(FILE_CONTENT);

            var reader = new FileUserListReader();

            // Execute
            var result = reader.GetUserNamesFromList(fileName);

            // Verify
            Assert.AreEqual(2, result.Count());
            CollectionAssert.Contains(result.ToArray(), "User1");
            CollectionAssert.Contains(result.ToArray(), "User2");

            // TearDown
            File.Delete(fileName);
        }
        public void When_File_Does_Not_Exist_Then_ArgumentException_Is_Thrown()
        {
            // Setup
            var reader = new FileUserListReader();

            // Execute
            reader.GetUserNamesFromList("NoFile.config");
        }
        public void When_File_Is_Empty_Then_UserList_Is_Empty()
        {
            // Setup
            var fileName = CreateFileWithContent(string.Empty);
            var reader = new FileUserListReader();

            // Execute
            var result = reader.GetUserNamesFromList(fileName);

            // Verify
            Assert.AreEqual(0, result.Count());

            // TearDown
            File.Delete(fileName);
        }