protected override void Act()
            {
                actualSomethingProvider = container.Resolve <ISomethingProvider>();
                actualLinkedTypes       = new HashSet <string>();

                // Execute requests, with the 3rd one unhandled
                actualCall1Result = actualSomethingProvider.GetSomething(
                    1,
                    11,
                    "",
                    DateTime.Now,
                    0,
                    0,
                    actualLinkedTypes);

                actualCall2Result = actualSomethingProvider.GetSomething(
                    2,
                    22,
                    "",
                    DateTime.Now,
                    0,
                    0,
                    actualLinkedTypes);

                try
                {
                    actualSomethingProvider.GetSomething(3, 33, "", DateTime.Now, 0, 0, actualLinkedTypes);
                }
                catch (Exception ex)
                {
                    actualExceptionCall3 = ex;
                }
            }
Exemplo n.º 2
0
 public NSubstituteUsageTest()
 {
     _somethingProvider = Substitute.For <ISomethingProvider>();
 }