public void SortTypeFactory_CreateSortType_DescendingTypeValue_CreateDescendingTypeInstance() { var sortTypeFactory = new SortTypeFactory(); ISortType sortType = sortTypeFactory.CreateSortType(SortTypeEnum.Descending); Assert.IsInstanceOfType(sortType, typeof(DescendingSortType)); }
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); }