Exemple #1
0
        public void Ctor_NoPropertyFilled_SerializesEmptyObject()
        {
            var sut = new Unity.Protocol.Unity();

            var actual = sut.ToJsonString();

            Assert.AreEqual("{\"type\":\"unity\"}", actual);
        }
Exemple #2
0
        public void SerializeObject_AllPropertiesSetToNonDefault_SerializesValidObject()
        {
            var sut = new Unity.Protocol.Unity
            {
                InstallMode            = "DeveloperBuild",
                CopyTextureSupport     = "Copy3D",
                RenderingThreadingMode = "MultiThreaded",
                TargetFrameRate        = "30"
            };

            var actual = sut.ToJsonString();

            Assert.AreEqual(
                "{\"type\":\"unity\"," +
                "\"install_mode\":\"DeveloperBuild\"," +
                "\"copy_texture_support\":\"Copy3D\"," +
                "\"rendering_threading_mode\":\"MultiThreaded\"," +
                "\"target_frame_rate\":\"30\"}",
                actual);
        }