public void MultipleCharacterStrings() { int endOffset = 0; byte[] content = Helper.ReadFixture("CharacterString", "www.google.com-string"); IList <CharacterString> characterStrings = CharacterString.GetAllFromArray(content, 0, out endOffset); Assert.Equal(3, characterStrings.Count); Assert.Equal(15, endOffset); CharacterString characterString = characterStrings[0]; Assert.Equal("www", characterString.ToString()); Assert.Equal(4, characterString.Size); characterString = characterStrings[1]; Assert.Equal("google", characterString.ToString()); Assert.Equal(7, characterString.Size); characterString = characterStrings[2]; Assert.Equal("com", characterString.ToString()); Assert.Equal(4, characterString.Size); }
public void EmptyCharacterString() { CharacterString characterString = new CharacterString(new byte[0]); byte[] content = Helper.ReadFixture("CharacterString", "empty-string"); Assert.Equal(content, characterString.ToArray()); Assert.Equal("", characterString.ToString()); }
public void SimpleCharacterString() { CharacterString characterString = new CharacterString("www"); byte[] content = Helper.ReadFixture("CharacterString", "www-string"); Assert.Equal(content, characterString.ToArray()); Assert.Equal("www", characterString.ToString()); }
public override void handle(LocalDevice localDevice, Address from, OctetString linkService) { // TODO RemoteDevice d = localDevice.getRemoteDeviceCreate(deviceIdentifier.getInstanceNumber(), from, linkService); RemoteObject o = new RemoteObject(objectIdentifier); o.ObjectName = objectName.ToString(); // TODO d.setObject(o); // TODO localDevice.getEventHandler().fireIHaveReceived(d, o); }
public void EmptyCharacterString() { int endOffset = 0; byte[] content = Helper.ReadFixture("CharacterString", "empty-string"); CharacterString characterString = CharacterString.FromArray(content, 0, out endOffset); Assert.Equal("", characterString.ToString()); Assert.Equal(1, characterString.Size); Assert.Equal(1, endOffset); }
public void SimpleCharacterString() { int endOffset = 0; byte[] content = Helper.ReadFixture("CharacterString", "www-string"); CharacterString characterString = CharacterString.FromArray(content, 0, out endOffset); Assert.Equal("www", characterString.ToString()); Assert.Equal(4, characterString.Size); Assert.Equal(4, endOffset); }