Exemplo n.º 1
0
            public IEnumerator WHEN_FillSessionIdFunctionCalled_THEN_SessionIdIsFilled()
            {
                BatterySessionManagement batterySessionManagement = new BatterySessionManagement();

                // Call tested function
                batterySessionManagement.FillSessionId();

                yield return(null);

                Assert.AreEqual(typeof(Guid), batterySessionManagement.sessionId.GetType());
            }
Exemplo n.º 2
0
            public IEnumerator WHEN_FillSessionIdFunctionCalled_THEN_RandomGuidIsGenerated()
            {
                BatterySessionManagement batterySessionManagement1 = new BatterySessionManagement();

                batterySessionManagement1.FillSessionId();
                Guid guid1 = batterySessionManagement1.sessionId;

                BatterySessionManagement batterySessionManagement2 = new BatterySessionManagement();

                batterySessionManagement2.FillSessionId();
                Guid guid2 = batterySessionManagement2.sessionId;

                yield return(null);

                Assert.AreNotEqual(guid1, guid2);
            }