Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotOverrideAlreadySetRelationshipTypeId() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldNotOverrideAlreadySetRelationshipTypeId()
        {
            // GIVEN
            string             defaultType  = "TYPE";
            Decorator          decorator    = defaultRelationshipType(defaultType);
            InputEntityVisitor relationship = decorator.apply(_entity);

            // WHEN
            int typeId = 5;

            relationship(relationship, "source", 1, 0, NO_PROPERTIES, null, "start", "end", null, typeId);

            // THEN
            assertTrue(_entity.hasIntType);
            assertEquals(typeId, _entity.intType);
        }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCramMultipleDecoratorsIntoOne()
        public virtual void ShouldCramMultipleDecoratorsIntoOne()
        {
            // GIVEN
            Decorator decorator1 = spy(new IdentityDecorator());
            Decorator decorator2 = spy(new IdentityDecorator());
            Decorator multi      = decorators(decorator1, decorator2);

            // WHEN
            InputEntityVisitor node = mock(typeof(InputEntityVisitor));

            multi.apply(node);

            // THEN
            InOrder order = inOrder(decorator1, decorator2);

            order.verify(decorator1, times(1)).apply(node);
            order.verify(decorator2, times(1)).apply(node);
            order.verifyNoMoreInteractions();
        }
Example #3
0
 public DataAnonymousInnerClass([email protected] decorator, Charset charset, File[] files)
 {
     this._decorator = decorator;
     this._charset   = charset;
     this._files     = files;
 }
Example #4
0
 public DataAnonymousInnerClass2([email protected] decorator, System.Func <CharReadable> readable)
 {
     this._decorator = decorator;
     this._readable  = readable;
 }