Пример #1
0
 protected override void Check(SaveTest <Color> expected, SaveTest <Color> loaded)
 {
     Assert.Equal(expected.TheProp.r, loaded.TheProp.r);
     Assert.Equal(expected.TheProp.g, loaded.TheProp.g);
     Assert.Equal(expected.TheProp.b, loaded.TheProp.b);
     Assert.Equal(expected.TheProp.a, loaded.TheProp.a);
 }
Пример #2
0
 protected override void Check(SaveTest <Quaternion> expected, SaveTest <Quaternion> loaded)
 {
     Assert.Equal(expected.TheProp.x, loaded.TheProp.x);
     Assert.Equal(expected.TheProp.y, loaded.TheProp.y);
     Assert.Equal(expected.TheProp.z, loaded.TheProp.z);
     Assert.Equal(expected.TheProp.w, loaded.TheProp.w);
 }
Пример #3
0
        protected override void Check(SaveTest <Ray3> expected, SaveTest <Ray3> loaded)
        {
            Assert.Equal(expected.TheProp.Origin.x, loaded.TheProp.Origin.x);
            Assert.Equal(expected.TheProp.Origin.y, loaded.TheProp.Origin.y);
            Assert.Equal(expected.TheProp.Origin.z, loaded.TheProp.Origin.z);

            Assert.Equal(expected.TheProp.Direction.x, loaded.TheProp.Direction.x);
            Assert.Equal(expected.TheProp.Direction.y, loaded.TheProp.Direction.y);
            Assert.Equal(expected.TheProp.Direction.z, loaded.TheProp.Direction.z);
        }
Пример #4
0
        public JsonTestBase(T value)
        {
            mockup.Add <TestTypeFinder>(s => new TestTypeFinder());

            mockup.Add <JsonSaver>(s => new JsonSaver(s.Get <TestTypeFinder>()));

            filePath  = $"../../../JsonSaverTests/Examples/{this.GetType().Name}.json";
            writeFile = Directory.Exists(Path.GetDirectoryName(filePath));

            data = new SaveTest <T>()
            {
                TheProp = value
            };
        }
Пример #5
0
 protected override void Check(SaveTest <char> expected, SaveTest <char> loaded)
 {
     Assert.Equal(expected.TheProp, loaded.TheProp);
 }
Пример #6
0
 protected abstract void Check(SaveTest <T> expected, SaveTest <T> loaded);
Пример #7
0
 protected override void Check(SaveTest <Vector3> expected, SaveTest <Vector3> loaded)
 {
     Assert.Equal(expected.TheProp.x, loaded.TheProp.x);
     Assert.Equal(expected.TheProp.y, loaded.TheProp.y);
     Assert.Equal(expected.TheProp.z, loaded.TheProp.z);
 }
Пример #8
0
 protected override void Check(SaveTest <ReallyCoolEnum> expected, SaveTest <ReallyCoolEnum> loaded)
 {
     Assert.Equal(expected.TheProp, loaded.TheProp);
 }