Beispiel #1
0
        public void AsyncServerConstructorTest()
        {
            AsyncServer   server = new AsyncServer();
            SetOfAnswers1 soa    = new SetOfAnswers1();

            StringAssert.ReferenceEquals(soa.GetType().ToString(), server.SetOfAnswers.GetType().ToString());
        }
Beispiel #2
0
        public void TestMethod1()
        {
            //Create Object instance for class EmpClass
            EmpClass obj1         = new EmpClass("Peter", "Harry");
            EmpClass obj2         = new EmpClass("John", "Parker");
            String   obj1fullName = obj1.empFullName();
            String   obj2fullName = obj2.empFullName();

            Console.WriteLine("The Employee obj 1 Full Name is: " + obj1fullName + "\n");
            Console.WriteLine("The Employee obj 2 Full Name is: " + obj2fullName + "\n");
            StringAssert.Equals(obj1fullName, obj2fullName);
            StringAssert.ReferenceEquals(obj1fullName, obj2fullName);
        }
Beispiel #3
0
        public void ReferenceEqualsFailsWhenUsed()
        {
            var ex = Assert.Throws <InvalidOperationException>(() => StringAssert.ReferenceEquals(string.Empty, string.Empty));

            Assert.That(ex.Message, Does.StartWith("StringAssert.ReferenceEquals should not be used for Assertions"));
        }