コード例 #1
0
 public void PhotoSearchRadiusTest()
 {
     // get test
     Assert.That(PhotoSearchRadius.Ten.ToString(), Is.EqualTo("10"));
     Assert.That(PhotoSearchRadius.OneHundred.ToString(), Is.EqualTo("100"));
     Assert.That(PhotoSearchRadius.Eighty.ToString(), Is.EqualTo("800"));
     Assert.That(PhotoSearchRadius.SixThousand.ToString(), Is.EqualTo("6000"));
     Assert.That(PhotoSearchRadius.FiftyThousand.ToString(), Is.EqualTo("50000"));
     // parse test
     Assert.That(PhotoSearchRadius.FromJsonString("10"), Is.EqualTo(PhotoSearchRadius.Ten));
     Assert.That(PhotoSearchRadius.FromJsonString("100"), Is.EqualTo(PhotoSearchRadius.OneHundred));
     Assert.That(PhotoSearchRadius.FromJsonString("800"), Is.EqualTo(PhotoSearchRadius.Eighty));
     Assert.That(PhotoSearchRadius.FromJsonString("6000"), Is.EqualTo(PhotoSearchRadius.SixThousand));
     Assert.That(PhotoSearchRadius.FromJsonString("50000"), Is.EqualTo(PhotoSearchRadius.FiftyThousand));
 }
コード例 #2
0
        public void PhotoSearchRadiusTest()
        {
            // get test
            Assert.That(actual: PhotoSearchRadius.Ten.ToString(), expression: Is.EqualTo(expected: "10"));
            Assert.That(actual: PhotoSearchRadius.OneHundred.ToString(), expression: Is.EqualTo(expected: "100"));
            Assert.That(actual: PhotoSearchRadius.Eighty.ToString(), expression: Is.EqualTo(expected: "800"));
            Assert.That(actual: PhotoSearchRadius.SixThousand.ToString(), expression: Is.EqualTo(expected: "6000"));
            Assert.That(actual: PhotoSearchRadius.FiftyThousand.ToString(), expression: Is.EqualTo(expected: "50000"));

            // parse test
            Assert.That(actual: PhotoSearchRadius.FromJsonString(response: "10"), expression: Is.EqualTo(expected: PhotoSearchRadius.Ten));

            Assert.That(actual: PhotoSearchRadius.FromJsonString(response: "100")
                        , expression: Is.EqualTo(expected: PhotoSearchRadius.OneHundred));

            Assert.That(actual: PhotoSearchRadius.FromJsonString(response: "800")
                        , expression: Is.EqualTo(expected: PhotoSearchRadius.Eighty));

            Assert.That(actual: PhotoSearchRadius.FromJsonString(response: "6000")
                        , expression: Is.EqualTo(expected: PhotoSearchRadius.SixThousand));

            Assert.That(actual: PhotoSearchRadius.FromJsonString(response: "50000")
                        , expression: Is.EqualTo(expected: PhotoSearchRadius.FiftyThousand));
        }