コード例 #1
0
        public void NullIsNull()
        {
            var converter = new SKConfettiPhysicsTypeConverter();

            var result = converter.ConvertFromInvariantString(null);

            Assert.Null(result);
        }
コード例 #2
0
        public void CanParsePointValues(string value)
        {
            var converter = new SKConfettiPhysicsTypeConverter();

            var result = converter.ConvertFromInvariantString(value);

            var physics = Assert.IsType <SKConfettiPhysics>(result);

            Assert.Equal(12, physics.Size);
            Assert.Equal(34, physics.Mass);
        }
コード例 #3
0
        public void ThrowsOnBadValues(string value)
        {
            var converter = new SKConfettiPhysicsTypeConverter();

            Assert.Throws <InvalidOperationException>(() => converter.ConvertFromInvariantString(value));
        }