public void FunctionFreReturnsExpectedValue() { var sut = new Fre(); var result = sut.Execute(new List <Accumulator> { new Accumulator(3.0) }); Assert.AreEqual(48000, result.ValueAsDouble()); }
private static void Beep(Fre freq = Fre.no, Dur dura = Dur.crom) { if (freq != Fre.no) { Console.Beep((int)freq, (int)dura); } else { Thread.Sleep((int)dura); } }
public void FunctionFreRequiresOneParameter(int count, bool throwsException) { var sut = new Fre(); var parameters = new List <Accumulator> { }; for (int i = 0; i < count; i++) { parameters.Add(new Accumulator(3.0)); } var result = Test.Throws <SyntaxErrorException, Accumulator>( () => sut.Execute(parameters), throwsException); }