public void SampleTests_SayHelloNoInput() { SampleBL sampleBL = new SampleBL(); var response = sampleBL.SayHello(""); Assert.IsNull(response); }
[HttpPost] // ... and change this to [HttpGet] public GradesViewModel SampleGetMyLogin(GradesViewModel vm) { SampleBL sampleBL = new SampleBL(); vm = sampleBL.GetMyLogin(vm); return(vm); }
public IHttpActionResult DemoPost(GradesViewModel vm) { SampleBL sampleBL = new SampleBL(); vm = sampleBL.DemoPost(vm); return(Ok(vm)); }
public void SampleTests_SayHelloSuccess() { SampleBL sampleBL = new SampleBL(); var response = sampleBL.SayHello("satya"); Assert.IsNotNull(response); Assert.IsTrue(response == "Hello.. satya"); }
public void SampleTests_SayHelloException() { SampleBL sampleBL = new SampleBL(); try { var response = sampleBL.SayHello(null); Assert.IsNotNull(response); } catch (Exception ex) { Assert.IsNotNull(ex); } }