コード例 #1
0
 public static Dictionary <int, ISentenceOperation> CreateStrategyMapper(ICustomSentenceFormatter customSentenceFormatter)
 {
     return(new Dictionary <int, ISentenceOperation>
     {
         { 1, new DuplicateCheckOperation(customSentenceFormatter) },
         { 2, new VowelCountCheckOperation(customSentenceFormatter) },
         { 3, new VowelComparerCheckOperation(customSentenceFormatter) }
     });
 }
コード例 #2
0
        public void Setup()
        {
            _customSentenceFormatter = new CustomSentenceFormatter();

            _sentenceService = new VowelComparerCheckOperation(_customSentenceFormatter);
        }
コード例 #3
0
 public VowelCountCheckOperation(ICustomSentenceFormatter customSentenceFormatter)
 {
     _customSentenceFormatter = customSentenceFormatter;
 }
コード例 #4
0
        public void Setup()
        {
            _customSentenceFormatter = new CustomSentenceFormatter();

            _mockSentenceFormatter = new Mock <ICustomSentenceFormatter>(MockBehavior.Default);
        }
コード例 #5
0
 public DuplicateCheckOperation(ICustomSentenceFormatter customSentenceFormatter)
 {
     _customSentenceFormatter = customSentenceFormatter;
 }
コード例 #6
0
        public void Setup()
        {
            _customSentenceFormatter = new CustomSentenceFormatter();

            _sentenceService = new DuplicateCheckOperation(_customSentenceFormatter);
        }