コード例 #1
0
            public void WhenParamIsNullResultNull()
            {
                var recommender = new Recommender(strngr);

                var comments = recommender.CommentsTo(null);

                Assert.IsNull(comments);
            }
コード例 #2
0
            public void WhenParamIsInvalidResultExeption()
            {
                var recommender = new Recommender(strngr);
                var prod        = new Good()
                {
                };

                Assert.Catch <NullReferenceException>(() => recommender.CommentsTo(product: prod));
            }
コード例 #3
0
            public void WhenParamIsNotNullResultOK()
            {
                var recommender = new Recommender(strngr);
                var prod        = new Good()
                {
                    Product = new Preparation(), Supplier = new Supplier()
                };

                var comments = recommender.CommentsTo(product: prod);

                Assert.NotNull(comments);
            }