public void TestInterface_Implementation() { // Assamble // Login types LogInToken logInToken = new LogInToken("token"); LogInBasicAuth logInBasicAuth = new LogInBasicAuth("user", "password"); // Login service that can go for either ways LogInService serviceToken = new LogInService(logInToken); LogInService serviceBasicAuth = new LogInService(logInBasicAuth); // Act serviceToken.LogIn(); serviceBasicAuth.LogIn(); // Assert Assert.AreEqual(serviceToken.IsLogged(), serviceBasicAuth.IsLogged()); }