public void TestDontHaveRunningType() { RunningTypeService.Setup(r => r.GetRunningType(It.IsAny <string>())).Returns(It.IsAny <RunningType>()); RunningNoService RunningNo = new RunningNoService(Context, RunningTypeService.Object); ReturnMessageDTO result = RunningNo.GenerateRunningNo("02", "US"); Assert.AreEqual("Not found running Tpye!!", result.Message); }
public void TestHaveRunningType() { Mockdata(); RunningNoService RunningNo = new RunningNoService(Context, RunningTypeService.Object); ReturnMessageDTO result = RunningNo.GenerateRunningNo("01", "US"); Assert.AreEqual("RunningNo Created Success!!", result.Message); }
public void TestCreateRunningNoCodeNotSame() { RunningTypeService.Setup(r => r.GetRunningType(It.IsAny <string>())).Returns(It.IsAny <RunningType>()); RunningNoService RunningNo = new RunningNoService(Context, RunningTypeService.Object); SystemRunningNo result = RunningNo.CreateRunningNo(new RunningType() { Code = "02" }, "UAS"); Assert.AreNotSame("01", result.RunningTypeCode); }