コード例 #1
0
        public void PersistentDataPathFileAll()
        {
            float    randomNumber = Random.value;
            DataTest dataTestSave = DataTest.Create("DataTest_All", Config.ForPersistentDataPathFile <DataTest>(binary: true, checksum: true, shuffle: Config.PersistentDataPathFileShuffleTypes.DeviceId));

            dataTestSave.VarTest = randomNumber;
            dataTestSave.Save();

            DataTest dataTestLoad = DataTest.Create("DataTest_All", Config.ForPersistentDataPathFile <DataTest>(binary: true, checksum: true, shuffle: Config.PersistentDataPathFileShuffleTypes.DeviceId));

            dataTestLoad.Load();

            Assert.AreEqual(dataTestLoad.VarTest, randomNumber);
        }
コード例 #2
0
        public void PersistentDataPathFileShuffledRandom()
        {
            float    randomNumber = Random.value;
            DataTest dataTestSave = DataTest.Create("DataTest_ShuffledRandom", Config.ForPersistentDataPathFile <DataTest>(shuffle: Config.PersistentDataPathFileShuffleTypes.Random));

            dataTestSave.VarTest = randomNumber;
            dataTestSave.Save();

            DataTest dataTestLoad = DataTest.Create("DataTest_ShuffledRandom", Config.ForPersistentDataPathFile <DataTest>(shuffle: Config.PersistentDataPathFileShuffleTypes.Random));

            dataTestLoad.Load();

            Assert.AreEqual(dataTestLoad.VarTest, randomNumber);
        }
コード例 #3
0
        public void PersistentDataPathFileChecksum()
        {
            float    randomNumber = Random.value;
            DataTest dataTestSave = DataTest.Create("DataTest_Checksum", Config.ForPersistentDataPathFile <DataTest>(checksum: true));

            dataTestSave.VarTest = randomNumber;
            dataTestSave.Save();

            DataTest dataTestLoad = DataTest.Create("DataTest_Checksum", Config.ForPersistentDataPathFile <DataTest>(checksum: true));

            dataTestLoad.Load();

            Assert.AreEqual(dataTestLoad.VarTest, randomNumber);
        }
コード例 #4
0
        public void PersistentDataPathFileText()
        {
            float    randomNumber = Random.value;
            DataTest dataTestSave = DataTest.Create("DataTest_Text", Config.ForPersistentDataPathFile <DataTest>(binary: false));

            dataTestSave.VarTest = randomNumber;
            dataTestSave.Save();

            DataTest dataTestLoad = DataTest.Create("DataTest_Text", Config.ForPersistentDataPathFile <DataTest>(binary: false));

            dataTestLoad.Load();

            Assert.AreEqual(dataTestLoad.VarTest, randomNumber);
        }
コード例 #5
0
ファイル: RegexMatchTest.cs プロジェクト: ndkhili/Regex
        public void IsMatch_ShouldSucceed()
        {
            var result = regexMatch.IsMatch(DataTest.TEXT, DataTest.GetRegex());

            result.Should().BeTrue();
        }
コード例 #6
0
ファイル: RegexMatchTest.cs プロジェクト: ndkhili/Regex
 public void Setup()
 {
     this.regexMatch = new RegexMatch.Domain.RegexMatch(DataTest.TEXT, DataTest.GetRegex());
 }