Exemplo n.º 1
0
        public void TweetFactory_InputIsNotValid_ReturnsException()
        {
            string lineFeed = "Alan>";

            TweetFactory factory = new TweetFactory();
            var result = factory.Create(lineFeed);
        }
Exemplo n.º 2
0
        public void TweetFactory_InputIsValid_ReturnsInstance()
        {
            string lineFeed = "Alan> Good Morning.";

            TweetFactory factory = new TweetFactory();
            var result = factory.Create(lineFeed);

            Assert.AreEqual("Alan", result.Name);
            Assert.AreEqual("Good Morning.", result.Message);
        }
Exemplo n.º 3
0
 internal TweetFileReader(string folderPath = "")
 {
     _path = Path.Combine(folderPath, ConfigurationManager.AppSettings[Constants.TweetsFilePath]);
     _factory = new TweetFactory();
 }