WriteAtom() public method

Write a string to the stream as an Erlang atom. Assumes ISO-8859-1 encoding. This will throw an exception if the string can't be converted.
public WriteAtom ( string atom ) : void
atom string The string to write.
return void
        public void Can_Parse_Bare_RpbErrorResp()
        {
            byte[] b = null;
            using (var os = new OtpOutputStream())
            {
                os.WriteAtom(TtbErrorDecoder.RpbErrorRespAtom);
                os.Flush();
                b = os.ToArray();
            }

            var ex = Assert.Throws<RiakException>(() => new TsTtbResp(b));
            Assert.IsTrue(ex.Message.Contains(TtbErrorDecoder.RpbErrorRespEmpty));
        }
        public void Write_Atom()
        {
            byte[] want = { 131, 100, 0, 18, 102, 114, 97, 122, 122, 108, 101, 100, 97, 122, 122, 108, 101, 45, 49, 50, 51, 52 };
            byte[] got;
            using (var os = new OtpOutputStream())
            {
                os.Write(OtpExternal.VersionTag);
                os.WriteAtom("frazzledazzle-1234");
                Assert.AreEqual(want.Length, os.Position);
                got = os.ToArray();
            }

            CollectionAssert.AreEqual(want, got);
        }
        public void Can_Parse_RpbErrorResp_In_2_Tuple_With_Code()
        {
            byte[] b = null;
            using (var os = new OtpOutputStream())
            {
                os.WriteTupleHead(2);
                os.WriteAtom(TtbErrorDecoder.RpbErrorRespAtom);
                os.WriteLong(ErrCode);
                os.Flush();
                b = os.ToArray();
            }

            var ex = Assert.Throws<RiakException>(() => new TsTtbResp(b));
            Assert.IsTrue(ex.Message.Contains(ErrCode.ToString()));
        }