// Update is called once per frame void Update() { float translation = Input.GetAxis("Mouse ScrollWheel"); weck = GameObject.FindGameObjectWithTag("wecker"); wecker = weck.GetComponent<Wecker>(); }
public void Gestoppter_Wecker_meldet_keine_Restzeit() { var sut = new Wecker(null); sut.Gestoppt += () => { }; sut.Stoppen(); sut.Ist_Weckzeit_erreicht(new TimeSpan(0), _ => Assert.Fail(), Assert.Fail); }
public void Weckzeit_erreicht() { var sut = new Wecker(null); var abgelaufen = false; sut.Ist_Weckzeit_erreicht(new DateTime(2000,1,1,10,0,0).Subtract(new DateTime(2000,1,1,10,0,0)), _ => {}, () => abgelaufen=true); Assert.IsTrue(abgelaufen); }
public void Ohne_Weckzeit_keine_Restzeit() { var sut = new Wecker(null); var result = new TimeSpan(0); sut.Restzeit += _ => result = _; sut.Zeitzeichen(new DateTime(2013, 1, 24, 9, 58, 0)); Assert.AreEqual(new TimeSpan(0), result); }
public void Gestoppter_Wecker_meldet_Stopp() { var sut = new Wecker(null); var result = false; sut.Gestoppt += () => result = true; sut.Stoppen(); Assert.IsTrue(result); }
public void Restzeit_berechnen() { var sut = new Wecker(null); var result = new TimeSpan(0); sut.Restzeit += _ => result = _; sut.Starten(new Tuple<DateTime, TimeSpan>(new DateTime(2013,1,24,10,0,0), new TimeSpan(0))); sut.Zeitzeichen(new DateTime(2013,1,24,9,58,0)); Assert.AreEqual(new TimeSpan(0,2,0), result); }
void Update() { GameObject zb = GameObject.FindGameObjectWithTag("ziffernblatt"); wecker = zb.GetComponent<Wecker>(); }
public void Weckzeit_noch_nicht_erreicht() { var sut = new Wecker(null); sut.Ist_Weckzeit_erreicht(new TimeSpan(0,0,10,42), _ => {}, Assert.Fail); }
// Use this for initialization void Start() { zb = GameObject.FindGameObjectWithTag("ziffernblatt"); wecker = zb.GetComponent<Wecker>(); }