示例#1
0
        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);
        }
示例#2
0
        public void TestHaveRunningType()
        {
            Mockdata();
            RunningNoService RunningNo = new RunningNoService(Context, RunningTypeService.Object);
            ReturnMessageDTO result    = RunningNo.GenerateRunningNo("01", "US");

            Assert.AreEqual("RunningNo Created Success!!", result.Message);
        }
示例#3
0
        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);
        }