public void MemberTotalDetailEstimate()
        {
            var storyA  = EntityFactory.CreateStory("Story A", SandboxProject);
            var defectB = EntityFactory.CreateDefect("Defect B", SandboxProject);
            var task1   = storyA.CreateTask("Task 1");

            storyA.Owners.Add(SandboxMember);
            defectB.Owners.Add(SandboxMember);
            task1.Owners.Add(SandboxMember);

            task1.DetailEstimate   = 5;
            defectB.DetailEstimate = 10;

            task1.Save();
            storyA.Save();
            defectB.Save();

            var rogue = SandboxProject.CreateDefect("Rogue");

            rogue.Owners.Add(SandboxMember);
            rogue.DetailEstimate = 13.37;
            rogue.Save();
            rogue.Delete();

            Assert.AreEqual(15, SandboxMember.GetTotalDetailEstimate(null));
            Assert.AreEqual(15, SandboxMember.GetTotalDetailEstimate(new WorkitemFilter()));
            Assert.AreEqual(10, SandboxMember.GetTotalDetailEstimate(new PrimaryWorkitemFilter()));
            Assert.AreEqual(null, SandboxMember.GetTotalDetailEstimate(new StoryFilter()));
            Assert.AreEqual(10, SandboxMember.GetTotalDetailEstimate(new DefectFilter()));
            Assert.AreEqual(5, SandboxMember.GetTotalDetailEstimate(new SecondaryWorkitemFilter()));
            Assert.AreEqual(5, SandboxMember.GetTotalDetailEstimate(new TaskFilter()));
            Assert.AreEqual(null, SandboxMember.GetTotalDetailEstimate(new TestFilter()));
        }
Example #2
0
    private void CreateMember(SandboxMember sandboxMember)
    {
        GameObject gameObject = Instantiate(_prefabs.wUILoomModuleMembersMemberElement.gameObject, _components.memberContainer, false);
        WUILoomModuleMembersMemberElement wUILoomModuleMembersMemberElement = gameObject.GetComponent <WUILoomModuleMembersMemberElement>();

        wUILoomModuleMembersMemberElement.Populate(this, sandboxMember);
    }
Example #3
0
 internal void Create(SandboxMember sandboxMember, Vector3 position)
 {
     if (sandboxMember is SandboxEvent)
     {
         GameObject             gameObject             = Instantiate(_prefabs.wUILoomNodeModuleEvent.gameObject, _components.nodeContainer);
         WUILoomNodeModuleEvent wUILoomNodeModuleEvent = gameObject.GetComponent <WUILoomNodeModuleEvent>();
         _components.wUILoomNodes.Add(wUILoomNodeModuleEvent);
         wUILoomNodeModuleEvent.Populate(new LoomEvent((SandboxEvent)sandboxMember));
         gameObject.transform.position = position;
     }
     else
     {
         GameObject gameObject = Instantiate(_prefabs.wUILoomNodeModuleCallOut.gameObject, _components.nodeContainer);
         WUILoomNodeModuleCallOut wUILoomNodeModuleCallOut = gameObject.GetComponent <WUILoomNodeModuleCallOut>();
         _components.wUILoomNodes.Add(wUILoomNodeModuleCallOut);
         gameObject.transform.position = position;
     }
 }
        public void MemberTotalEstimate()
        {
            var storyA  = EntityFactory.CreateStory("Story A", SandboxProject);
            var defectB = EntityFactory.CreateDefect("Defect B", SandboxProject);

            storyA.Owners.Add(SandboxMember);
            defectB.Owners.Add(SandboxMember);

            storyA.Estimate  = 5;
            defectB.Estimate = 10;

            storyA.Save();
            defectB.Save();

            //Epic rogue = SandboxProject.CreateEpic("Rogue");
            //rogue.Owners.Add(SandboxMember);
            //rogue.Estimate = 13.37;
            //rogue.Save();

            Assert.AreEqual(15, SandboxMember.GetTotalEstimate(null));
            Assert.AreEqual(15, SandboxMember.GetTotalEstimate(new PrimaryWorkitemFilter()));
            Assert.AreEqual(5, SandboxMember.GetTotalEstimate(new StoryFilter()));
            Assert.AreEqual(10, SandboxMember.GetTotalEstimate(new DefectFilter()));
        }
Example #5
0
 internal void Select(SandboxMember sandboxMember)
 {
     base.Unstack();
     _components.wUILoomModules.Unstack();
     wUI.user.editorWUI.wUILoomInpsector.Create(sandboxMember, base.transform.position);
 }
 internal void Populate(WUILoomModuleMembers wUILoomModuleMembers, SandboxMember sandboxMember)
 {
     _data.sandboxMember = sandboxMember;
     _components.wUILoomModuleMembers = wUILoomModuleMembers;
     _components.nameLabel.text       = $"{(sandboxMember is SandboxCall ? "CALL" : "EVENT")} : {sandboxMember.id}";
 }