public void FromCsv_VariousInput_Valid(string input, int expected) { // Act var actual = Sumator.FromCsv(input); // Assert Assert.Equal(expected, actual); }
static void Main(string[] args) { Pies wyżełAzor = new Pies { Nazwa = "Azor", Kolor = Color.SaddleBrown, Waga = 15.5m }; Pies pudelFafik = new Pies { Nazwa = "Fafik", Kolor = Color.Gray, Waga = 5.75m }; Console.WriteLine(wyżełAzor.ToString()); Console.WriteLine(pudelFafik.ToString()); pudelFafik.Nazwa = "Bogdan"; Console.WriteLine(pudelFafik.ToString()); pudelFafik = wyżełAzor; pudelFafik.Nazwa = "Brutus"; Console.WriteLine(wyżełAzor.ToString()); Console.WriteLine(pudelFafik.ToString()); int a = 1; int b = 2; int c; c = (a + b); a = 5; c = a + b; Console.WriteLine(c); b = 6; Console.WriteLine(c); var d = new Sumator(); d.A = 1; d.B = 2; Console.WriteLine(d.ToString()); d.A = 5; Console.WriteLine(d); }
protected void AddNumbers(object sender, EventArgs e) { if (IsValid) { var number1 = double.Parse(numberInput1.Value); var number2 = double.Parse(numberInput2.Value); var number3 = double.Parse(numberInput3.Value); Sumator sumator = new Sumator(number1, number2, number3); lblResult.Text = sumator.GetSum().ToString(); lblResult.Visible = true; } }
public Form1() { InitializeComponent(); model = new Sumator(1000); }
public void TearDown() { sumator = null; }
public void SetUp() { sumator = new Sumator(2.0, 3.0, 4.0); }