Issue 717 in moose-technology: Hismo and isStub

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 717 in moose-technology: Hismo and isStub

moose-technology
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Hismo Milestone-4.6

New issue 717 by [hidden email]: Hismo and isStub
http://code.google.com/p/moose-technology/issues/detail?id=717

The following test fails. No idea why. ClassB is a stub

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
testStubAndHismo
        | allModelClasses allHistoryModelClasses mooseSampleData sampleMooseModel  
hismoHistoryModel |
        mooseSampleData := MooseSampleData new.
        sampleMooseModel := (mooseSampleData readMSEString: self sampleMSE)
                                name: #'example'.
                               
        allModelClasses := sampleMooseModel allModelClasses.

        self assert: (sampleMooseModel allModelClasses size = 1).
        self assert: (sampleMooseModel allClasses size = 2).

        hismoHistoryModel := HismoModelHistory new.
        hismoHistoryModel addLastVersionForMooseModel: sampleMooseModel.
        allHistoryModelClasses := hismoHistoryModel allClassHistories
                                select: [:each | each last isStub not].
        self assert: allModelClasses size = allHistoryModelClasses size


sampleMSE
        ^ '(
        (FAMIX.Namespace (id: 1) (name ''aNamespace''))

        (FAMIX.Class (id: 2) (name ''ClassA'') (container (ref: 1)) (parentPackage  
(ref: 201)))
        (FAMIX.Method (name ''methodA1'') (signature ''methodA1()'') (parentType  
(ref: 2)) (LOC 2))
        (FAMIX.Attribute (name ''attributeA1'') (parentType (ref: 2)))

        (FAMIX.Class (id: 3) (name ''ClassB'') (container (ref: 1)) (isStub true)  
(parentPackage (ref: 201)))

        (FAMIX.Inheritance (subclass (ref: 3)) (superclass (ref: 2)))

        (FAMIX.Package (id: 201) (name ''aPackage''))
        (FAMIX.Package (id: 202) (name ''aPackage'') (parentPackage (ref: 201)))
)'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Indeed, it looks like MooseEntity>>isStub is the trouble maker.

We need to create an issue.

In the meantime you can use:
        allHistoryModelClasses := hismoHistoryModel allClassHistories
                                select: [:each | each last versionEntity  
isStub not].

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 717 in moose-technology: Hismo and isStub

moose-technology
Updates:
        Status: Fixed
        Owner: [hidden email]

Comment #1 on issue 717 by [hidden email]: Hismo and isStub
http://code.google.com/p/moose-technology/issues/detail?id=717

Fixed.

I added HismoEntityVersion>>isStub and appropriate test.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev