public void GetNewFavoriteNumberAfterNotify()
        {
            var subscriber = new NumberFan();
            var newValue   = 3;

            subscriber.Notify(newValue);

            subscriber.FavoriteNumber.ShouldBe(newValue);
        }
        public void UpdateFanMailBodyWithNewFavoriteNumber()
        {
            var letter      = Substitute.For <IWrittenMessage>();
            var subscriber  = new NumberFan(letter);
            var newFavorite = 3;

            subscriber.Notify(newFavorite);

            letter.Received().AddBody(Arg.Is <string>(x => x.Contains("3")));
        }
        public void WriteBlastBasedOnUpdate()
        {
            var subscriber = new NumberFan();
            var testNumber = 5;

            subscriber.Notify(5);

            var result = subscriber.WriteBlast();

            result.ShouldContain(testNumber.ToString());
        }