示例#1
0
        public void Should_Get_Hello_String_Fluent()
        {
            var sut = new MyClass();
            string result = sut.GetHelloString("Michael");

            result.Should().StartWith("Hello").And.EndWith("Michael");
        }
示例#2
0
        public void Should_Add_Two_Numbers()
        {
            var sut = new MyClass();
            int result = sut.Add(10, 20);

            Assert.That(result, Is.EqualTo(30));
        }
 private void Form_InputPinCode_Load(object sender, EventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start(this.authorizeUrl);
     }
     catch (Exception ex)
     {
         MyClass util = new MyClass();
         util.ShowExceptionMessageBox(ex.Message, ex.StackTrace);
     }
 }
示例#4
0
 public void Should_Add_Two_Numbers_Fluent()
 {
     var sut = new MyClass();
     int result = sut.Add(1, 20);
     result.Should().Be(30, "because 10+20=30.");
 }