public void DoSomethingHandlesEmptyDataSet() { // set-up Daddy daddy = new Daddy(); // test IList<MyClass> result = daddy.DoSomething("blah", "101 Dalmation Road", "*****@*****.**", out error, new FakeProvider(new Enumerable.Empty<AcmeData>())); // a class we've written to act in lieu of the real provider // validate Assert.NotNull(result); // most testing frameworks provides Assert functionality Assert.IsTrue(result.Count == 0); Assert.IsFalse(String.IsNullOrEmpty(error)); }
public static void Main(string[] args) { var data = new Daddy[] { new Radfahren(1, 2, 3), new Laufen(3, 2, 1) }; int i = 0; int a = 1; int b = 2; int c = 3; for (i = 0; i < data.Length; i++) { data[0].updatetrack(a, b, c); data[1].updatetrack(a, b, c); a++; b++; c++; } data[0].print_data(); data[1].print_data(); return; }
public override string ToString() { return(Id + " " + ADRESS_CITY + " " + Mam.ToString() + " " + Daddy.ToString() + " " + Animal.ToString()); }