private string RegistrateSummary() { var name = _namesGenerator.GetRandomName(); _collection.Add(new MetricDefinition <Summary>(name, Metrics.CreateSummary(name, _namesGenerator.GetRandomName()))); return(name); }
public Room() { NumberOfDoors = 1; NumberOfWindows = 1; Area = 0; ID = Guid.NewGuid(); Name = namesGenerator.GetRandomName(); }
public void EndGame() { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; statisticsUI.SetActive(true); string name = NamesGenerator.GetRandomName(); int timeOnGroundMins = (int)Mathf.Floor(timeOnGround / 60); float timeOnGroundSecs = timeOnGround - 60.0f * timeOnGroundMins; string timeOnGroundStr = "Ground time: " + timeOnGroundMins + "m " + timeOnGroundSecs.ToString("0.##") + "s"; int timeMins = (int)Mathf.Floor(totalTime / 60); float timeSecs = totalTime - timeMins * 60.0f; string totalTimeStr = "Time: " + timeMins + "m " + timeSecs.ToString("0.##") + "s"; string highScoreString = "Look for a high score with the name " + name + "!"; statisticsUI.GetComponentInChildren <Text>().text = timeOnGroundStr + "\n" + totalTimeStr + "\n" + highScoreString; SubmitHighScore(totalTime, timeOnGround, name); }
public ChaosMonkeyException() { var generator = new NamesGenerator(); MonkeyName = generator.GetRandomName(); }
public void NamesGenerator_GetRandomName() { var val = NamesGenerator.GetRandomName(); Assert.True(!string.IsNullOrEmpty(val)); }
public void PrometheusMetricsRegistry_RegistrateCounter_RegistrateDefinition() { // Arrange var sut = CreateSUT(); var metric = Metrics.CreateCounter(_namesGenerator.GetRandomName(), _namesGenerator.GetRandomName(), new string[] { _namesGenerator.GetRandomName() }); // Act sut.RegistrateCounter(metric); // Assert Assert.Contains((IEnumerable <MetricDefinition <Counter> >)_collection, m => m.Key.Equals(metric.Name) && m.Metric == metric); }