예제 #1
0
 public void NullSender_Ctor_Throws()
 {
     IItemRepository repo      = new MockItemRepository();
     IFooProcessor   processor = new StubFooProcessor();
     IFooSender      sender    = null;
     var             workflow  = new FooWorkflow(repo, processor, sender);
 }
예제 #2
0
 public void NullSender_Ctor_Throws()
 {
     IItemRepository repo = new MockItemRepository();
     IFooProcessor processor = new StubFooProcessor();
     IFooSender sender = null;
     var workflow = new FooWorkflow(repo, processor, sender);
 }
예제 #3
0
        public void AllValid_Run_Success()
        {
            //I don't know what a proper set of unit tests would be for a given workflow, other than that it should exercise all code paths
            //and confirm that all specifications are met. This is just an example.
            var repo      = new MockItemRepository();
            var processor = new StubFooProcessor();
            var sender    = new MockFooSender();
            var workflow  = new FooWorkflow(repo, processor, sender);

            workflow.Run();

            Assert.AreEqual(1, repo.TimesRun);
            Assert.AreEqual(2, sender.GetSentFoos().Count());
        }
예제 #4
0
        public void AllValid_Run_Success()
        {
            //I don't know what a proper set of unit tests would be for a given workflow, other than that it should exercise all code paths
            //and confirm that all specifications are met. This is just an example.
            var repo = new MockItemRepository();
            var processor = new StubFooProcessor();
            var sender = new MockFooSender();
            var workflow = new FooWorkflow(repo, processor, sender);

            workflow.Run();

            Assert.AreEqual(1, repo.TimesRun);
            Assert.AreEqual(2, sender.GetSentFoos().Count());
        }