예제 #1
0
        public void SampleTests_SayHelloNoInput()
        {
            SampleBL sampleBL = new SampleBL();
            var      response = sampleBL.SayHello("");

            Assert.IsNull(response);
        }
예제 #2
0
        [HttpPost] // ... and change this to [HttpGet]
        public GradesViewModel SampleGetMyLogin(GradesViewModel vm)
        {
            SampleBL sampleBL = new SampleBL();

            vm = sampleBL.GetMyLogin(vm);
            return(vm);
        }
예제 #3
0
        public IHttpActionResult DemoPost(GradesViewModel vm)
        {
            SampleBL sampleBL = new SampleBL();

            vm = sampleBL.DemoPost(vm);
            return(Ok(vm));
        }
예제 #4
0
        public void SampleTests_SayHelloSuccess()
        {
            SampleBL sampleBL = new SampleBL();
            var      response = sampleBL.SayHello("satya");

            Assert.IsNotNull(response);
            Assert.IsTrue(response == "Hello.. satya");
        }
예제 #5
0
        public void SampleTests_SayHelloException()
        {
            SampleBL sampleBL = new SampleBL();

            try
            {
                var response = sampleBL.SayHello(null);
                Assert.IsNotNull(response);
            }
            catch (Exception ex)
            {
                Assert.IsNotNull(ex);
            }
        }