Пример #1
0
        public void Subtract_ForNumbers_Subtracts()
        {
            _subtract.Execute(1,
                              2)
            .Returns(-1);

            CreateSut().Subtract(1,
                                 2)
            .Should()
            .Be(-1);
        }
Пример #2
0
        public void Subtract_ForNumbers_Subtracts(Calculator sut,
                                                  [Freeze] ISubtract subtract)
        {
            subtract?.Execute(1,
                              2)
            .Returns(-1);

            sut.Subtract(1,
                         2)
            .Should()
            .Be(-1);
        }
Пример #3
0
 public int Subtract(int a,
                     int b)
 {
     return(_subtract.Execute(a,
                              b));
 }