Exemplo n.º 1
0
        public void Init()
        {
            var mockIntergerHumanizer = new Mock <IIntergerHumanizer>();

            mockIntergerHumanizer.Setup(m => m.Humanize(0)).Returns("zero");
            mockIntergerHumanizer.Setup(m => m.Humanize(1)).Returns("one");
            mockIntergerHumanizer.Setup(m => m.Humanize(11)).Returns("eleven");
            mockIntergerHumanizer.Setup(m => m.Humanize(111)).Returns("one-hunderd eleven");

            _integerHumanizer = mockIntergerHumanizer.Object;
            _sut = new CurrencyReadableBuilder(_integerHumanizer);
        }
Exemplo n.º 2
0
 public CurrencyHumanizer(IReadableBuilder currencyBuilder, IFormatParser currencyParser)
 {
     _currencyBuilder = currencyBuilder;
     _currencyParser  = currencyParser;
 }