コード例 #1
0
        public MainWindow(DictionaryController controller)
        {
            //Setting the dictionaryController
            this.controller = controller;

            SettingBasics();
        }
コード例 #2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
コード例 #3
0
        public MainWindow()
        {
            //Setting the dictionaryController
            this.controller = new DictionaryController();

            SettingBasics();
        }
コード例 #4
0
 public Dictionary()
 {
     InitializeComponent();
     controller             = new DictionaryController();
     lBoxLetters.DataSource = controller.ImportAlphabet();
     UpdateRoutine();
 }
コード例 #5
0
 public frmMyWordPools(User currentUser)
 {
     InitializeComponent();
     user = currentUser;
     _wordPoolController       = new WordPoolController();
     _wordPoolDetailController = new WordPoolDetailController();
     _dictionaryController     = new DictionaryController();
 }
コード例 #6
0
        public DisplayWords(DictionaryController controller)
        {
            this.controller = controller;

            InitializeComponent();

            pickLanguage.ItemsSource = controller.GetLanguages();
            words.ItemsSource        = controller.GetWords();
        }
コード例 #7
0
 public frmAddWordToPool(User currentUser, WordPool currentPool)
 {
     InitializeComponent();
     _dictionaryController     = new DictionaryController();
     _wordPoolController       = new WordPoolController();
     _wordPoolDetailController = new WordPoolDetailController();
     user     = currentUser;
     wordPool = currentPool;
 }
コード例 #8
0
 public frmAdminChangeWord(Dictionary dictionary, Form frm)
 {
     InitializeComponent();
     txtEnglish.Text       = dictionary.English;
     txtTurkish.Text       = dictionary.Turkish;
     chkActive.Checked     = dictionary.IsActive;
     updatedDictionary     = dictionary;
     _dictionaryController = new DictionaryController();
     frmWordList           = (frmAdminWordList)frm;
 }
コード例 #9
0
        public void Setup()
        {
            _dictionaryConfiguration = Substitute.For <IOptions <Dictionary> >();
            _dictionaryConfiguration.Value.Returns(new Dictionary()
            {
                pageSize = 100, path = " "
            });

            _wordsRepository   = Substitute.For <IWordsRepository>();
            _dictionaryService = Substitute.For <IDictionaryService>();

            _fileRepository       = Substitute.For <IFileRepository>();
            _dictionaryController = new DictionaryController(_dictionaryConfiguration, _wordsRepository, _dictionaryService);
        }
コード例 #10
0
ファイル: FileCheckerTest.cs プロジェクト: ultv/PythonInTask
        public void CompareDictionary_word_in_dictionary__formated_word_returned()
        {
            //Arrange
            DictionaryController dict = new DictionaryController();

            dict.Dict.Add("Проверка");

            string accept   = "Проверка";
            string expected = " <b><i>Проверка</i></b> ";

            //Act
            string actual = dict.CompareDictionary(accept);

            //Result
            Assert.AreEqual(expected, actual);
        }
コード例 #11
0
        public void Setup()
        {
            if (mapper == null)
            {
                var mappingConfig = new MapperConfiguration(mc =>
                {
                    mc.AddProfile(new AutomapperProfile());
                });
                IMapper mapper = mappingConfig.CreateMapper();
                this.mapper = mapper;
            }

            var dbContextOptions = new DbContextOptionsBuilder <DatabaseContext>()
                                   .UseInMemoryDatabase(Guid.NewGuid().ToString())
                                   .Options;

            db = new DatabaseContext(dbContextOptions);
            dictionaryService    = new DictionaryService(mapper, db);
            dictionaryController = new DictionaryController(dictionaryService);
            Seed(db);
        }
コード例 #12
0
 public frmAdminWordList()
 {
     InitializeComponent();
     _dictionaryController = new DictionaryController();
     dictionary            = new Dictionary();
 }
コード例 #13
0
 public void SetUp()
 {
     dictionaryManager = new DictionaryManager(new ApiClientFactory(new HttpClient(), new Uri("http://api.wikiled.com")));
     instance          = CreateDictionaryController();
 }
コード例 #14
0
 public frmAdminAddNewWord(Form frm)
 {
     InitializeComponent();
     _dictionaryController = new DictionaryController();
     frmWordList           = (frmAdminWordList)frm;
 }
コード例 #15
0
 public frmWordStatistics()
 {
     InitializeComponent();
     _dictionaryController = new DictionaryController();
 }
コード例 #16
0
 public void SetUp()
 {
     mockDictionaryManager = new Mock <IDictionaryManager>();
     cacheHelper           = new CacheHelper();
     instance = CreateDictionaryController();
 }