コード例 #1
0
        public void GivenAValidId_WhenAnNewsTickerIsRequested_ThenNewsTickerIsReturned()
        {
            _newsTickerRepository.Setup(n => n.GetNewsTicker()).Returns(new NewsTicker());
            NewsTicker newsTicker = _newsTickerService.GetNewsTicker();

            newsTicker.Should().NotBeNull();
        }
コード例 #2
0
ファイル: NewsTicker.cs プロジェクト: Nachtrind/Fungus
 void Awake()
 {
     instance = this;
     fader.alpha = 0;
     InvokeRepeating("RegularCheck", 1f, 1f);
     canvas = GetComponentInParent<Canvas>();
 }
コード例 #3
0
        public void GivenANewsTicker_WhenITryToSearchForItById_ItIsRetrievedFromTheDatabase()
        {
            NewsTicker nt     = _newsTickerRepository.Create(_newsTicker1);
            var        result = _newsTickerRepository.GetNewsTicker(nt.Id);

            result.Should().NotBeNull();
            result.News.Should().Be("test news");
        }
コード例 #4
0
        public void GivenAValidCode_WhenIRequestAllNewsTicker_ThenAllNewsTickerAreReturned()
        {
            var testNewsTicker = new NewsTicker();

            _newsTickerRepository.Setup(n => n.GetNewsTicker()).Returns(testNewsTicker);
            var newsTicker = _newsTickerService.GetNewsTicker();

            newsTicker.Should().NotBeNull();
        }
コード例 #5
0
ファイル: GameManager.cs プロジェクト: rhysstever/Stonks
 // Start is called before the first frame update
 void Start()
 {
     multipliers = new int[8] {
         1, 1, 1, 1, 1, 1, 1, 1
     };
     prestigeLevel   = 1;
     graph           = graph.GetComponent <GraphManager>();
     market          = new Market();
     nt              = this.gameObject.GetComponent <NewsTicker>();
     isMaxMultiplier = false;
     LoadGame();
 }
コード例 #6
0
 public NewsTicker AddNewsTicker(string news, DateTime date)
 {
     try
     {
         var newsTicker = new NewsTicker(news, date);
         return(_newsTickerRepository.Create(newsTicker));
     }
     catch (Exception e)
     {
         throw new UnityException("Unable to create News Ticker", e);
     }
 }
コード例 #7
0
ファイル: EventManager.cs プロジェクト: rhysstever/Stonks
    // Start is called before the first frame update
    void Start()
    {
        gm = GameObject.Find("GameManager").GetComponent <GameManager>();
        m  = gm.market;
        nt = gm.nt;

        positiveStockTickerTexts = new Dictionary <string, string>();
        negativeStockTickerTexts = new Dictionary <string, string>();

        foreach (KeyValuePair <string, Stock> s in m.StockList)
        {
            positiveStockTickerTexts.Add(s.Key, s.Key + " is spiking!");
            negativeStockTickerTexts.Add(s.Key, s.Key + " is tumbling!");
            positiveStockTickerTexts.Add(s.Key + "squeeze", s.Key + " is experiencing a Gamma Squeeze!");
            negativeStockTickerTexts.Add(s.Key + "manip", s.Key + " is experiencing a Short Ladder Attack!");
        }
    }