Esempio n. 1
0
 public void OccupationTypeTest()
 {
     // get test
     Assert.That(OccupationType.Work.ToString(), Is.EqualTo("work"));
     Assert.That(OccupationType.School.ToString(), Is.EqualTo("school"));
     Assert.That(OccupationType.University.ToString(), Is.EqualTo("university"));
     // parse test
     Assert.That(OccupationType.FromJsonString("work"), Is.EqualTo(OccupationType.Work));
     Assert.That(OccupationType.FromJsonString("school"), Is.EqualTo(OccupationType.School));
     Assert.That(OccupationType.FromJsonString("university"), Is.EqualTo(OccupationType.University));
 }
Esempio n. 2
0
        public void OccupationTypeTest()
        {
            // get test
            Assert.That(actual: OccupationType.Work.ToString(), expression: Is.EqualTo(expected: "work"));
            Assert.That(actual: OccupationType.School.ToString(), expression: Is.EqualTo(expected: "school"));
            Assert.That(actual: OccupationType.University.ToString(), expression: Is.EqualTo(expected: "university"));

            // parse test
            Assert.That(actual: OccupationType.FromJsonString(response: "work"), expression: Is.EqualTo(expected: OccupationType.Work));
            Assert.That(actual: OccupationType.FromJsonString(response: "school"), expression: Is.EqualTo(expected: OccupationType.School));

            Assert.That(actual: OccupationType.FromJsonString(response: "university")
                        , expression: Is.EqualTo(expected: OccupationType.University));
        }