Ejemplo n.º 1
0
        public void GetPartGroupByKeyTest()
        {
            PartGroupBLL target   = new PartGroupBLL();
            PartGroup    tmpGroup = target.GetPartGroupByKey(new PartGroup {
                GroupID = 1
            });

            Assert.IsNotNull(tmpGroup);
        }
Ejemplo n.º 2
0
        public void DeletePartGroup()
        {
            PartGroupBLL target = new PartGroupBLL();
            PartGroup    group  = new PartGroup {
                GroupID = 30
            };

            target.DeletePartGroup(group);
            group = target.GetPartGroupByKey(group);
            Assert.AreEqual(null, group);
        }
Ejemplo n.º 3
0
        public void UpdatePartGroup()
        {
            PartGroupBLL target = new PartGroupBLL();
            PartGroup    group  = new PartGroup {
                GroupID = 48, GroupName = "test group048", Description = "desc"
            };

            //group.Part.Add(new Part { PartID = new System.Guid("BAF2361E-CB23-4515-96A3-000BFA2D7D56") });
            group.Part.Add(new Part {
                PartID = new System.Guid("6D95D410-994C-4DB2-803D-0012CBB90BD9")
            });
            group.Part.Add(new Part {
                PartID = new System.Guid("564D2794-0E93-47C1-9682-0018CAA85F2F")
            });
            //group.Part.Add(new Part { PartID = new System.Guid("7B1BE85D-9B95-4BC1-8BC5-0020AE58D2EE") });
            //group.Part.Add(new Part { PartID = new System.Guid("44997C30-0C2C-46C4-A172-00251018EC85") });
            //group.Part.Add(new Part { PartID = new System.Guid("6E29BACB-858B-46C5-8596-003786F21FBB") });
            group.Part.Add(new Part {
                PartID = new System.Guid("D232CEC7-7133-4905-9E5C-004128F6AC40")
            });
            target.UpdatePartGroup(group);


            PartGroupBLL target1 = new PartGroupBLL();
            PartGroup    group1  = new PartGroup {
                GroupID = 48, GroupName = "test group 0048", Description = "desc"
            };

            group.Part.Add(new Part {
                PartID = new System.Guid("BAF2361E-CB23-4515-96A3-000BFA2D7D56")
            });
            //group.Part.Add(new Part { PartID = new System.Guid("6D95D410-994C-4DB2-803D-0012CBB90BD9") });
            group.Part.Add(new Part {
                PartID = new System.Guid("564D2794-0E93-47C1-9682-0018CAA85F2F")
            });
            //group.Part.Add(new Part { PartID = new System.Guid("7B1BE85D-9B95-4BC1-8BC5-0020AE58D2EE") });
            //group.Part.Add(new Part { PartID = new System.Guid("44997C30-0C2C-46C4-A172-00251018EC85") });
            //group.Part.Add(new Part { PartID = new System.Guid("6E29BACB-858B-46C5-8596-003786F21FBB") });
            group1.Part.Add(new Part {
                PartID = new System.Guid("D232CEC7-7133-4905-9E5C-004128F6AC40")
            });
            target1.UpdatePartGroup(group1);

            group = target.GetPartGroupByKey(group);
            Assert.AreEqual("test group 048", group.GroupName);
        }