Example #1
0
            [TestMethod]                                                     // test stubs
            public void Create_WithNullSample_ShouldReturnBadRequestResult() // ServiceMethodToBeTest_ExpectedInput_ExpectedBehavior()
            {
                // arrange
                sample = null;
                // act
                var result = sut.CreateSample(sample);

                // assert

                Assert.IsInstanceOfType(result, typeof(BadRequestResult));

                mockService
                .Verify(
                    s => s.Save(Guid.Empty, sample), Times.Never
                    );
            }