Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/AbstractMessageTest.cs

    r3857 r4068  
    3636using System.Collections.Generic;
    3737using Google.ProtocolBuffers.Descriptors;
     38using Google.ProtocolBuffers.TestProtos;
    3839using NUnit.Framework;
    39 using Google.ProtocolBuffers.TestProtos;
    4040
    4141namespace Google.ProtocolBuffers {
     
    4646    public void Clear() {
    4747      AbstractMessageWrapper message = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder(TestUtil.GetAllSet())).Clear().Build();
    48       TestUtil.AssertClear((TestAllTypes) message.WrappedMessage);
     48      TestUtil.AssertClear((TestAllTypes)message.WrappedMessage);
    4949    }
    5050
     
    5252    public void Copy() {
    5353      AbstractMessageWrapper message = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder()).MergeFrom(TestUtil.GetAllSet()).Build();
    54       TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
     54      TestUtil.AssertAllFieldsSet((TestAllTypes)message.WrappedMessage);
    5555    }
    5656
     
    7373    public void Parsing() {
    7474      IBuilder builder = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder());
    75       AbstractMessageWrapper message = (AbstractMessageWrapper) builder.WeakMergeFrom(TestUtil.GetAllSet().ToByteString()).WeakBuild();
    76       TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
     75      AbstractMessageWrapper message = (AbstractMessageWrapper)builder.WeakMergeFrom(TestUtil.GetAllSet().ToByteString()).WeakBuild();
     76      TestUtil.AssertAllFieldsSet((TestAllTypes)message.WrappedMessage);
    7777    }
    7878
     
    167167    [Test]
    168168    public void MergeFrom() {
    169       AbstractMessageWrapper result = (AbstractMessageWrapper) 
     169      AbstractMessageWrapper result = (AbstractMessageWrapper)
    170170        new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder(MergeDest))
    171171            .MergeFrom(MergeSource)
     
    177177    // -----------------------------------------------------------------
    178178    // Tests for equals and hashCode
    179    
     179
    180180    [Test]
    181181    public void EqualsAndHashCode() {
     
    187187      TestAllExtensions f = TestAllExtensions.CreateBuilder(e)
    188188          .AddExtension(UnitTestProtoFile.RepeatedInt32Extension, 999).Build();
    189        
     189
    190190      CheckEqualsIsConsistent(a);
    191191      CheckEqualsIsConsistent(b);
     
    194194      CheckEqualsIsConsistent(e);
    195195      CheckEqualsIsConsistent(f);
    196      
     196
    197197      CheckNotEqual(a, b);
    198198      CheckNotEqual(a, c);
     
    226226      CheckEqualsIsConsistent(eUnknownFields, eUnknownFields2);
    227227    }
    228    
     228
    229229    /// <summary>
    230230    /// Asserts that the given protos are equal and have the same hash code.
     
    233233      // Object should be equal to itself.
    234234      Assert.AreEqual(message, message);
    235      
     235
    236236      // Object should be equal to a dynamic copy of itself.
    237237      DynamicMessage dynamic = DynamicMessage.CreateBuilder(message).Build();
     
    298298        return wrappedMessage.HasField(field);
    299299      }
    300    
     300
    301301      public override object this[FieldDescriptor field] {
    302302        get { return wrappedMessage[field]; }
     
    310310        return wrappedMessage.GetRepeatedFieldCount(field);
    311311      }
    312      
     312
    313313      public override UnknownFieldSet UnknownFields {
    314314        get { return wrappedMessage.UnknownFields; }
     
    322322        return new Builder(wrappedMessage.WeakToBuilder());
    323323      }
    324      
     324
    325325      internal class Builder : AbstractBuilder<AbstractMessageWrapper, Builder> {
    326326        private readonly IBuilder wrappedBuilder;
Note: See TracChangeset for help on using the changeset viewer.