Exemplo n.º 1
0
        public void AddNewComplainTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            FormViewParameter Parameter = new FormViewParameter();

            IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable dt = new IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable();
            DataRow dr = dt.NewRow();

            dr["ComplainId"]         = new Guid();
            dr["ComplaintNo"]        = "YSL456";
            dr["ComplaintType"]      = new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3");
            dr["AgainstEmpID"]       = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
            dr["ComplainingEmpID"]   = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
            dr["ComplainantName"]    = "Sandhya";
            dr["ComplainantAddress"] = "BASKAR RAO,CHENNAI";
            dr["ComplaintDate"]      = DateTime.Now;
            dr["ReceivingOfficeId"]  = new Guid("d12d7a4b-bb0b-4af7-badf-03f44efd73e7");
            dr["Subject"]            = "I AM NOT FILLING WELL SO I COULD'NT COME";
            dr["Detail"]             = "I AM NOT FILLING WELL SO I COULD'NT COME";
            dr["CreatedBy"]          = "admin";
            dt.Rows.Add(dr);
            Parameter.Values = dt.Rows[0];
            bool expected = true;

            Assert.AreEqual(expected, target.AddNewComplain(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 2
0
        public void GetInvestigationDetailTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            Guid ComplainId = new Guid("fcb8faeb-7a67-4593-95db-16f367836e3a"); // TODO: Initialize to an appropriate value

            Assert.IsInstanceOfType(target.GetInvestigationDetail(ComplainId), typeof(IGRSS.DataAccessLayer.Complain.InvestigationDataTable), "IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
                                    "he expected value.");
        }
Exemplo n.º 3
0
        public void GetComplainDetailsByComplainNoTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            string ComplaintNo = "123"; // TODO: Initialize to an appropriate value

            Assert.IsInstanceOfType(target.GetComplainDetailsByComplainNo(ComplaintNo), typeof(IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable), "IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
                                    "he expected value.");
        }
Exemplo n.º 4
0
        public void GetComplainDetailsByComplainIdTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            Guid ComplainId = new Guid("894c4a04-db7f-40e9-bd5d-107f1352ffa2"); // TODO: Initialize to an appropriate value

            Assert.IsInstanceOfType(target.GetComplainDetailsByComplainId(ComplainId), typeof(IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable), "IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
                                    "he expected value.");
        }
Exemplo n.º 5
0
        public void CloseComplainFileTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            Guid ComplainId = new Guid("9934e3eb-282d-4776-b242-1277cf75b2ef"); // TODO: Initialize to an appropriate value

            Assert.AreEqual(true, target.CloseComplainFile(ComplainId), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 6
0
        public void DeleteInvesTigationDetailsTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            Guid InvestigationID = new Guid("341c716a-1519-41d1-95e1-b94171e0aa8a"); // TODO: Initialize to an appropriate value

            target.DeleteInvesTigationDetails(InvestigationID);
            Assert.AreEqual(true, target.DeleteInvesTigationDetails(InvestigationID), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 7
0
 public void AddInvestigatonDetailTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     Guid ComplainId = new Guid("5ef55527-79ee-49c8-8f23-220cd5ecc9fc"); // TODO: Initialize to an appropriate value
     DateTime InvDate = new DateTime(); // TODO: Initialize to an appropriate value
     string InvDetails ="this is investigated by pradeep as behalf of new"; // TODO: Initialize to an appropriate value
     Assert.AreEqual(true, target.AddInvestigatonDetail(ComplainId, InvDate, InvDetails), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
              "");
 }
Exemplo n.º 8
0
        public void AssignEnquiryOfficerTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            string InvestigatingOfficer = "Pradeep";                                        // TODO: Initialize to an appropriate value
            Guid   ComplainId           = new Guid("894c4a04-db7f-40e9-bd5d-107f1352ffa2"); // TODO: Initialize to an appropriate value

            target.AssignEnquiryOfficer(InvestigatingOfficer, ComplainId);
            Assert.AreEqual(true, target.AssignEnquiryOfficer(InvestigatingOfficer, ComplainId), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 9
0
        public void AddInvestigatonDetailTest()
        {
            IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
            Guid     ComplainId = new Guid("5ef55527-79ee-49c8-8f23-220cd5ecc9fc");   // TODO: Initialize to an appropriate value
            DateTime InvDate    = new DateTime();                                     // TODO: Initialize to an appropriate value
            string   InvDetails = "this is investigated by pradeep as behalf of new"; // TODO: Initialize to an appropriate value

            Assert.AreEqual(true, target.AddInvestigatonDetail(ComplainId, InvDate, InvDetails), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 10
0
 public void AddNewComplainTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     FormViewParameter Parameter = new FormViewParameter();
     IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable dt = new IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable();
     DataRow dr = dt.NewRow();
     dr["ComplainId"] = new Guid();
     dr["ComplaintNo"] = "YSL456";
     dr["ComplaintType"] = new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3");
     dr["AgainstEmpID"] = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
     dr["ComplainingEmpID"] = new Guid("3c1820f7-bf70-499d-af99-1eb47a33cd9a");
     dr["ComplainantName"] = "Sandhya";
     dr["ComplainantAddress"] = "BASKAR RAO,CHENNAI";
     dr["ComplaintDate"] =DateTime.Now;
     dr["ReceivingOfficeId"] = new Guid("d12d7a4b-bb0b-4af7-badf-03f44efd73e7");
     dr["Subject"] ="I AM NOT FILLING WELL SO I COULD'NT COME";
     dr["Detail"] = "I AM NOT FILLING WELL SO I COULD'NT COME";
     dr["CreatedBy"] = "admin";
     dt.Rows.Add(dr);
     Parameter.Values = dt.Rows[0];
     bool expected = true;
     Assert.AreEqual(expected,target.AddNewComplain(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
             "");
 }
Exemplo n.º 11
0
 public void CloseComplainFileTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     Guid ComplainId = new Guid("9934e3eb-282d-4776-b242-1277cf75b2ef"); // TODO: Initialize to an appropriate value
     Assert.AreEqual(true, target.CloseComplainFile(ComplainId), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
            "");
 }
Exemplo n.º 12
0
 public void GetInvestigationDetailTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     Guid ComplainId = new Guid("fcb8faeb-7a67-4593-95db-16f367836e3a"); // TODO: Initialize to an appropriate value
     Assert.IsInstanceOfType(target.GetInvestigationDetail(ComplainId),typeof(IGRSS.DataAccessLayer.Complain.InvestigationDataTable),"IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
             "he expected value.");
 }
Exemplo n.º 13
0
 public void GetComplainDetailsByComplainNoTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     string ComplaintNo ="123"; // TODO: Initialize to an appropriate value
     Assert.IsInstanceOfType(target.GetComplainDetailsByComplainNo(ComplaintNo),typeof(IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable),"IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
             "he expected value.");
 }
Exemplo n.º 14
0
 public void GetComplainDetailsByComplainIdTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     Guid ComplainId = new Guid("894c4a04-db7f-40e9-bd5d-107f1352ffa2"); // TODO: Initialize to an appropriate value
     Assert.IsInstanceOfType(target.GetComplainDetailsByComplainId(ComplainId),typeof(IGRSS.DataAccessLayer.Complain.ComplainDetailsDataTable),"IGRSS.BusinessLogicLayer.Complain.GetComplainDetailsByComplainId did not return t" +
             "he expected value.");
 }
Exemplo n.º 15
0
 public void DeleteInvesTigationDetailsTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     Guid InvestigationID = new Guid("341c716a-1519-41d1-95e1-b94171e0aa8a"); // TODO: Initialize to an appropriate value
     target.DeleteInvesTigationDetails(InvestigationID);
     Assert.AreEqual(true, target.DeleteInvesTigationDetails(InvestigationID), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
            "");
 }
Exemplo n.º 16
0
        static void Main(string[] args)
        {
            #region Comments
            //Console.WriteLine("Starting Runtime....");

            Complain com = new Complain();

            //Guid OfficeId = new Guid("c53112ee-5868-43aa-bcf5-52454f589daa");
            //Guid ComType = new Guid("c53112ee-5868-43aa-bcf5-52454f589daa");
            //Guid AgnstId = new Guid("ebc55557-0de8-4209-a561-04aa622cdf00");
            //Guid EmpId = new Guid("ebc55557-0de8-4209-a561-04aa622cdf00");

            //com.AddNewComplain("123", ComType, AgnstId, EmpId, "anand", "address", DateTime.Now, OfficeId, "Sub", "test");
            //Guid Id = new Guid(Console.ReadLine());
            //com.AssignEnquiryOfficer(EmpId, Id);
            //Console.ReadLine();
            //int i = 0;
            //while ("y" == Console.ReadLine())
            //{
            //    com.AddInvestigatonDetail(Id, DateTime.Now, "Detailed Report" + i++);
            //}
            //com.CompleteInvestigaton(Id, DateTime.Now, "Investigation Done!!!");
            //Console.WriteLine("Close File??");
            //if ("y"==Console.ReadLine())
            //{
            //    com.CloseComplainFile(Id);
            //}
            ////using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
            ////{
            ////    AutoResetEvent waitHandle = new AutoResetEvent(false);
            ////    workflowRuntime.WorkflowCompleted += delegate(object sender, WorkflowCompletedEventArgs e)
            ////    {
            ////        Console.WriteLine("Wf Complete.");
            ////        waitHandle.Set();
            ////    };
            ////    workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e)
            ////    {
            ////        Console.WriteLine("Wf Terminated!!!");
            ////        Console.WriteLine(e.Exception.Message);
            ////        waitHandle.Set();
            ////    };

            ////    Console.WriteLine("Adding Services...");
            ////    ExternalDataExchangeService dataExchange;
            ////    dataExchange = new ExternalDataExchangeService();
            ////    workflowRuntime.AddService(dataExchange);

            ////        ComplainService Service = new ComplainService();
            ////    dataExchange.AddService(Service);

            ////    Console.WriteLine("Services Added!");

            ////    Dictionary<string, object> wfParams = new Dictionary<string, object>();

            ////    wfParams.Add("InitiatingOffice", new Guid("916fd082-061a-45fb-91a4-33967243b4cf"));

            ////    Console.WriteLine("Parameters Added..");
            ////    ComplainProcess pro = new ComplainProcess();
            ////    WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(ComplainProcess));
            ////    instance.Start();

            ////    Console.WriteLine("Wf Started.");
            ////    if ("Y" == Console.ReadLine())
            ////    {
            ////        Service.AcceptComplain(instance.InstanceId);
            ////        //feedbackService.ApproveRequest(instance.InstanceId, new FeedbackEventArgs(instance.InstanceId, Guid.NewGuid(), Guid.NewGuid()));
            ////    }

            ////    if ("N" == Console.ReadLine())
            ////    {
            ////        //feedbackService.RejectRequest(instance.InstanceId, new FeedbackEventArgs(instance.InstanceId, Guid.NewGuid(), Guid.NewGuid()));
            ////    }
            ////    waitHandle.WaitOne();
            ////}

            #endregion
            Console.ReadLine();
        }
Exemplo n.º 17
0
 public void AssignEnquiryOfficerTest()
 {
     IGRSS.BusinessLogicLayer.Complain target = new IGRSS.BusinessLogicLayer.Complain();
     string InvestigatingOfficer ="Pradeep"; // TODO: Initialize to an appropriate value
     Guid ComplainId = new Guid("894c4a04-db7f-40e9-bd5d-107f1352ffa2"); // TODO: Initialize to an appropriate value
     target.AssignEnquiryOfficer(InvestigatingOfficer, ComplainId);
     Assert.AreEqual(true, target.AssignEnquiryOfficer(InvestigatingOfficer, ComplainId), "IGRSS.BusinessLogicLayer.Complain.ComplainDetails did not return the expected value." +
            "");
 }