Пример #1
0
        public void TestIsomorphicStrings()
        {
            var r = IsomorphicStrings.YesOrNo("paperi", "txtyic");

            Assert.AreEqual(r, true);

            r = IsomorphicStrings.YesOrNo("paperia", "txtyicy");
            Assert.AreEqual(r, false);
        }
        public void TestMethod1(string s, string t, bool expected)
        {
            // Arrange
            IsomorphicStrings question = new IsomorphicStrings();

            // Act
            bool actual = question.IsIsomorphic(s, t);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void IsIsomorphicTest()
        {
            var c = new IsomorphicStrings();

            // example1
            var s      = "egg";
            var t      = "add";
            var result = c.IsIsomorphic(s, t);

            Assert.IsTrue(result);

            // example2
            s      = "foo";
            t      = "bar";
            result = c.IsIsomorphic(s, t);
            Assert.IsFalse(result);

            // example3
            s      = "paper";
            t      = "title";
            result = c.IsIsomorphic(s, t);
            Assert.IsTrue(result);
        }
Пример #4
0
 public void BeforeEach()
 {
     IsomorphicStrings = new IsomorphicStrings();
 }