コード例 #1
0
        public void SortTypeFactory_CreateSortType_DescendingTypeValue_CreateDescendingTypeInstance()
        {
            var sortTypeFactory = new SortTypeFactory();

            ISortType sortType = sortTypeFactory.CreateSortType(SortTypeEnum.Descending);

            Assert.IsInstanceOfType(sortType, typeof(DescendingSortType));
        }
コード例 #2
0
        public OutputControlsViewModel()
        {
            ISortTypeFactory     sortTypeFactory     = new SortTypeFactory();
            ISortStrategyFactory sortStrategyFactory = new SortStrategyFactory(sortTypeFactory);
            IStringValidator     stringValidator     = new StringToDecimalValidator();

            this.stringToCollectionParser = new StringToDecimalCollectionParser(stringValidator);
            this.sortHandler = new SortHandler(this.stringToCollectionParser, sortStrategyFactory);
        }